public async Task StartPublishJobAsync(int processingSetArtifactId, int workspaceArtifactId)
        {
            try
            {
                Console2.WriteDisplayStartLine("Starting Publish Job");

                // Create a publish job object.
                PublishJob publishJob = new PublishJob
                {
                    ProcessingSetId     = processingSetArtifactId,
                    WorkspaceArtifactId = workspaceArtifactId
                };

                // Submit the job for publish.
                await ProcessingJobManager.SubmitPublishJobsAsync(publishJob);

                Console2.WriteDisplayEndLine("Started Publish Job!");
            }
            catch (Exception ex)
            {
                throw new Exception("An error occured when staring Processing Publish Job", ex);
            }
        }
 /// <summary>
 /// Determines if this publish handler can perform the current publishing job
 /// </summary>
 /// <returns>True if it can publish, else false</returns>
 public override bool CanHandle(PublishJob job, IDataStore from, IEnumerable <IDataStore> to)
 {
     return(!job.Options.ItemId.HasValue);
 }
 /// <summary>
 /// Determines if this publish handler can perform the current publishing job
 /// </summary>
 /// <returns>True if it can publish, else false</returns>
 public override bool CanHandle(PublishJob job, IDataStore from, IEnumerable<IDataStore> to)
 {
     return job.Options.ItemId.HasValue;
 }