<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent”></a> Interface IWorkflowAgent
Namespace: SuperOffice.WebApi.AgentsAssembly: SuperOffice.WebApi.dll Agent lets you configure workflow automation
Implements
IAgentBase, IDisposableMethods
<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_AddAfterWorkflowStepAsync_System_Int32_SuperOffice_WebApi_Data_WorkflowStepBase_SuperOffice_WebApi_RequestOptions_”></a> AddAfterWorkflowStepAsync(int, WorkflowStepBase, RequestOptions)
Add another step (and any of its substeps) after the given step id (which must exist), and move any following steps in the workflow further down the line.Parameters
workflowStepId int
Primary key of WorkflowStep
subStep WorkflowStepBase
The step to be inserted after given step id.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<WorkflowStepBase> The added step<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_ConnectEmailFlowContentAsync_System_Int32_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> ConnectEmailFlowContentAsync(int, int, RequestOptions)
Link any SMessage to the email flow. The SMessage (and any related SShipment etc) should probably not be used/visible elsewhere.Parameters
emailFlowId int
The EmailFlow to connect the message to.
messageId int
The s_message to connect to the flow. A shipment, form or flow may be connected to that s_message.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_CopyEmailFlowAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> CopyEmailFlowAsync(int, string, RequestOptions)
Copy an email flow.Parameters
emailFlowId int
The EmailFlow to copy.
newName string
The name of the new email flow
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<int> Newly created email flow id for this content<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_CopyEmailFlowContentAsync_System_Int32_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> CopyEmailFlowContentAsync(int, int, RequestOptions)
Copy smessage and connected shipment to the email flow. The SMessage (and any related SShipment etc) should probably not be used/visible elsewhere.Parameters
emailFlowId int
The EmailFlow to connect the copied content to.
shipmentId int
The id of the shipment to copy to the flow. The message of this shipment will also be connected
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<int> Newly created shipment id for this content<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_CreateDefaultEmailFlowAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultEmailFlowAsync(RequestOptions)
Set default values into a new EmailFlow. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<EmailFlow> A blank EmailFlow<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_CreateDefaultWorkflowEventAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultWorkflowEventAsync(RequestOptions)
Set default values into a new WorkflowEvent. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<WorkflowEvent> A blank WorkflowEvent<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_CreateDefaultWorkflowEventResultAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultWorkflowEventResultAsync(RequestOptions)
Set default values into a new WorkflowEventResult. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<WorkflowEventResult> A blank WorkflowEventResult<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_CreateDefaultWorkflowFilterAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultWorkflowFilterAsync(RequestOptions)
Set default values into a new WorkflowFilter. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<WorkflowFilter> A blank WorkflowFilter<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_CreateDefaultWorkflowGoalAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultWorkflowGoalAsync(RequestOptions)
Set default values into a new WorkflowGoal. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<WorkflowGoal> A blank WorkflowGoal<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_CreateDefaultWorkflowStepFromTypeAsync_SuperOffice_WebApi_Data_WorkflowStepType_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultWorkflowStepFromTypeAsync(WorkflowStepType, RequestOptions)
Creates a new carrier from the step type given, with the right kind of properties, defaults set.Parameters
stepType WorkflowStepType
Step type to create
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<WorkflowStepBase><a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_CreateDefaultWorkflowStepOptionFromTypeAsync_SuperOffice_WebApi_Data_WorkflowSplitOptionType_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultWorkflowStepOptionFromTypeAsync(WorkflowSplitOptionType, RequestOptions)
Creates a new carrier from the option type given, with the right kind of properties, defaults set.Parameters
optionType WorkflowSplitOptionType
Option type to create
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<WorkflowStepOptionBase><a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_CreateDefaultWorkflowTriggerAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultWorkflowTriggerAsync(RequestOptions)
Set default values into a new WorkflowTrigger. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<WorkflowTrigger> A blank WorkflowTrigger<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_CreateDefaultWorkflowWaitForActionAsync_SuperOffice_WebApi_RequestOptions_”></a> CreateDefaultWorkflowWaitForActionAsync(RequestOptions)
Set default values into a new WorkflowWaitForAction. NetServer calculates default values on the entity, which is required when creating/storing a new instanceParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<WorkflowWaitForAction> A blank WorkflowWaitForAction<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_CreateEmailFlowContentAsync_System_Int32_System_String_SuperOffice_WebApi_RequestOptions_”></a> CreateEmailFlowContentAsync(int, string, RequestOptions)
Create content to an email flowParameters
emailFlowId int
The EmailFlow to connect the created message to.
contentName string
The name of the content created
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<int> Id of shipment created<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_DeleteEmailFlowAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteEmailFlowAsync(int, RequestOptions)
Deletes the EmailFlowParameters
emailFlowId int
The identity of the EmailFlow
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_DeleteWorkflowGoalAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteWorkflowGoalAsync(int, RequestOptions)
Deletes the WorkflowGoalParameters
workflowGoalId int
The identity of the WorkflowGoal
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_DeleteWorkflowTriggerAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteWorkflowTriggerAsync(int, RequestOptions)
Deletes the WorkflowTriggerParameters
workflowTriggerId int
The identity of the WorkflowTrigger
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_DeleteWorkflowWaitForActionAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> DeleteWorkflowWaitForActionAsync(int, RequestOptions)
Deletes the WorkflowWaitForActionParameters
workflowWaitForActionId int
The identity of the WorkflowWaitForAction
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_GetEmailFlowAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetEmailFlowAsync(int, RequestOptions)
Gets a specific EmailFlow object.Parameters
emailFlowId int
The identifier of the EmailFlow object
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<EmailFlow> EmailFlow<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_GetWorkflowFencingInfoAsync_SuperOffice_WebApi_RequestOptions_”></a> GetWorkflowFencingInfoAsync(RequestOptions)
Get the current Workflow fencing status for the tenantParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<FencingInfo> Current fencing status including count, maximum, and warning state<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_GetWorkflowGoalAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetWorkflowGoalAsync(int, RequestOptions)
Gets a specific WorkflowGoal object.Parameters
workflowGoalId int
The identifier of the WorkflowGoal object
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<WorkflowGoal> WorkflowGoal<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_GetWorkflowStepAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetWorkflowStepAsync(int, RequestOptions)
Get Workflowstep by IDParameters
workflowStepId int
Primary key of WorkflowStep
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<WorkflowStepBase> The Workflow step<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_GetWorkflowStepOptionAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetWorkflowStepOptionAsync(int, RequestOptions)
Get WorkflowStepOption by IDParameters
workflowStepOptionId int
Primary key of WorkflowStep option
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<WorkflowStepOptionBase> The Workflow step option<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_GetWorkflowTriggerAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetWorkflowTriggerAsync(int, RequestOptions)
Gets a specific WorkflowTrigger object.Parameters
workflowTriggerId int
The identifier of the WorkflowTrigger object
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<WorkflowTrigger> WorkflowTrigger<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_GetWorkflowWaitForActionAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> GetWorkflowWaitForActionAsync(int, RequestOptions)
Gets a specific WorkflowWaitForAction object.Parameters
workflowWaitForActionId int
The identifier of the WorkflowWaitForAction object
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<WorkflowWaitForAction> WorkflowWaitForAction<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_RemoveParticipantsFromEmailFlowAsync_System_Int32_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> RemoveParticipantsFromEmailFlowAsync(int, int[], RequestOptions)
Remove participants (actually workflow instances) from the workflowParameters
emailFlowId int
Primary key of EmailFlow
workflowInstanceIds int[]
Array of Workflow instances (representing participants) to be completely removed from the workflow
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_RunAsync_SuperOffice_WebApi_RequestOptions_”></a> RunAsync(RequestOptions)
Run the workflow engine right nowParameters
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<DateTime> Suggested time for next run<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_SaveEmailFlowAsync_SuperOffice_WebApi_Data_EmailFlow_SuperOffice_WebApi_RequestOptions_”></a> SaveEmailFlowAsync(EmailFlow, RequestOptions)
Updates the existing EmailFlow or creates a new EmailFlow if the id parameter is 0.Parameters
emailFlow EmailFlow
The EmailFlow that is saved.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<EmailFlow> New or updated EmailFlow<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_SaveWorkflowGoalAsync_SuperOffice_WebApi_Data_WorkflowGoal_SuperOffice_WebApi_RequestOptions_”></a> SaveWorkflowGoalAsync(WorkflowGoal, RequestOptions)
Updates the existing WorkflowGoal or creates a new WorkflowGoal if the id parameter is 0.Parameters
workflowGoal WorkflowGoal
The WorkflowGoal that is saved.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<WorkflowGoal> New or updated WorkflowGoal<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_SaveWorkflowTriggerAsync_SuperOffice_WebApi_Data_WorkflowTrigger_SuperOffice_WebApi_RequestOptions_”></a> SaveWorkflowTriggerAsync(WorkflowTrigger, RequestOptions)
Updates the existing WorkflowTrigger or creates a new WorkflowTrigger if the id parameter is 0.Parameters
workflowTrigger WorkflowTrigger
The WorkflowTrigger that is saved.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<WorkflowTrigger> New or updated WorkflowTrigger<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_SaveWorkflowWaitForActionAsync_SuperOffice_WebApi_Data_WorkflowWaitForAction_SuperOffice_WebApi_RequestOptions_”></a> SaveWorkflowWaitForActionAsync(WorkflowWaitForAction, RequestOptions)
Updates the existing WorkflowWaitForAction or creates a new WorkflowWaitForAction if the id parameter is 0.Parameters
workflowWaitForAction WorkflowWaitForAction
The WorkflowWaitForAction that is saved.
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<WorkflowWaitForAction> New or updated WorkflowWaitForAction<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_SendEventAsync_SuperOffice_WebApi_Data_WorkflowEvent_SuperOffice_WebApi_RequestOptions_”></a> SendEventAsync(WorkflowEvent, RequestOptions)
Send a workflow event. Most event signaling will finish very quickly as they normally just change the state of a workflow instanceParameters
workflowEvent WorkflowEvent
Information about the signaled event
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<WorkflowEventResult> Any relevant info about the event<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_SetStatusOnWorkflowAsync_System_Int32_SuperOffice_WebApi_Data_WorkflowDefinitionStatus_SuperOffice_WebApi_RequestOptions_”></a> SetStatusOnWorkflowAsync(int, WorkflowDefinitionStatus, RequestOptions)
Set status on workflow, Run or pause flowParameters
emailFlowId int
The id of the email flow to run or pause
status WorkflowDefinitionStatus
The new status
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<WorkflowDefinitionStatus> The new status<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_TryAddPersonsToEmailFlowAsync_System_Int32_System_Int32___SuperOffice_WebApi_RequestOptions_”></a> TryAddPersonsToEmailFlowAsync(int, int[], RequestOptions)
Try to add a participant to the EmailFlow. Same function available in PersonAgentParameters
emailFlowId int
Primary key of EmailFlow
personIds int[]
Array of Person Ids
requestOptions RequestOptions
Override language/culture codes on this request.
Returns
Task<bool[]> True if the corresponding participant was successfully added, false if it could not be added because of filter criteria or other reason<a id=“SuperOffice_WebApi_Agents_IWorkflowAgent_UpdateFormSubmissionsAsync_System_Int32_SuperOffice_WebApi_RequestOptions_”></a> UpdateFormSubmissionsAsync(int, RequestOptions)
Attempt to update stored field values for up to the given number of form submissionsParameters
maxCount int
The maximum number of form submissions to attempt to save as form field values.
requestOptions RequestOptions
Override language/culture codes on this request.