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);
        }
Beispiel #2
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);
        }