protected internal virtual UpdateJobSuspensionStateBuilderImpl CreateJobCommandBuilder()
        {
            var builder = new UpdateJobSuspensionStateBuilderImpl();

            if (!string.IsNullOrEmpty(JobDefinitionId))
            {
                builder.ByJobDefinitionId(JobDefinitionId);
            }
            else if (!string.IsNullOrEmpty(ProcessDefinitionId))
            {
                builder.ByProcessDefinitionId(ProcessDefinitionId);
            }
            else if (!string.IsNullOrEmpty(ProcessDefinitionKey))
            {
                builder.ByProcessDefinitionKey(ProcessDefinitionKey);

                if (IsProcessDefinitionTenantIdSet && !string.IsNullOrEmpty(ProcessDefinitionTenantId))
                {
                    builder.ProcessDefinitionTenantId(ProcessDefinitionTenantId);
                }
                else if (IsProcessDefinitionTenantIdSet)
                {
                    builder.ProcessDefinitionWithoutTenantId();
                }
            }
            return(builder);
        }
Exemple #2
0
        protected internal virtual UpdateJobSuspensionStateBuilderImpl createJobCommandBuilder()
        {
            UpdateJobSuspensionStateBuilderImpl builder = new UpdateJobSuspensionStateBuilderImpl();

            if (!string.ReferenceEquals(jobDefinitionId, null))
            {
                builder.byJobDefinitionId(jobDefinitionId);
            }
            else if (!string.ReferenceEquals(processDefinitionId, null))
            {
                builder.byProcessDefinitionId(processDefinitionId);
            }
            else if (!string.ReferenceEquals(processDefinitionKey, null))
            {
                builder.byProcessDefinitionKey(processDefinitionKey);

                if (isProcessDefinitionTenantIdSet && !string.ReferenceEquals(processDefinitionTenantId, null))
                {
                    builder.processDefinitionTenantId(processDefinitionTenantId);
                }
                else if (isProcessDefinitionTenantIdSet)
                {
                    builder.processDefinitionWithoutTenantId();
                }
            }
            return(builder);
        }
Exemple #3
0
        protected internal virtual IUpdateJobSuspensionStateBuilder CreateJobCommandBuilder()
        {
            var builder = new UpdateJobSuspensionStateBuilderImpl();

            if (!ReferenceEquals(ProcessInstanceId, null))
            {
                builder.ByProcessInstanceId(ProcessInstanceId);
            }
            else if (!ReferenceEquals(ProcessDefinitionId, null))
            {
                builder.ByProcessDefinitionId(ProcessDefinitionId);
            }
            else if (!ReferenceEquals(ProcessDefinitionKey, null))
            {
                builder.ByProcessDefinitionKey(ProcessDefinitionKey);

                if (IsProcessDefinitionTenantIdSet && !ReferenceEquals(ProcessDefinitionTenantId, null))
                {
                    return(builder.ProcessDefinitionTenantId(ProcessDefinitionTenantId));
                }
                if (IsProcessDefinitionTenantIdSet)
                {
                    return(builder.ProcessDefinitionWithoutTenantId());
                }
            }
            return(builder);
        }
 protected internal abstract AbstractSetJobStateCmd GetNextCommand(
     UpdateJobSuspensionStateBuilderImpl jobCommandBuilder);
 protected internal override AbstractSetJobStateCmd GetNextCommand(
     UpdateJobSuspensionStateBuilderImpl jobCommandBuilder)
 {
     return(new ActivateJobCmd(jobCommandBuilder));
 }
Exemple #6
0
            protected internal virtual SuspendJobCmd createSuspendJobCommand()
            {
                UpdateJobSuspensionStateBuilderImpl builder = (new UpdateJobSuspensionStateBuilderImpl()).byJobDefinitionId(jobDefinitionId);

                return(new SuspendJobCmd(builder));
            }