Skip to content

Latest commit

 

History

History
73 lines (44 loc) · 2.35 KB

workflows.md

File metadata and controls

73 lines (44 loc) · 2.35 KB

WorkflowsManager

List workflows

Returns list of workflows that act on a given folder ID, and have a flow with a trigger type of WORKFLOW_MANUAL_START.

You application must be authorized to use the Manage Box Relay application scope within the developer console in to use this endpoint.

This operation is performed by calling function getWorkflows.

See the endpoint docs at API Reference.

adminClient.getWorkflows().getWorkflows(new GetWorkflowsQueryParams(workflowFolderId))

Arguments

  • queryParams GetWorkflowsQueryParams
    • Query parameters of getWorkflows method
  • headers GetWorkflowsHeaders
    • Headers of getWorkflows method

Returns

This function returns a value of type Workflows.

Returns the workflow.

Starts workflow based on request body

Initiates a flow with a trigger type of WORKFLOW_MANUAL_START.

You application must be authorized to use the Manage Box Relay application scope within the developer console.

This operation is performed by calling function startWorkflow.

See the endpoint docs at API Reference.

adminClient.getWorkflows().startWorkflow(workflowToRun.getId(), new StartWorkflowRequestBody.StartWorkflowRequestBodyBuilder(new StartWorkflowRequestBodyFlowField.StartWorkflowRequestBodyFlowFieldBuilder().type("flow").id(workflowToRun.getFlows().get(0).getId()).build(), Arrays.asList(new StartWorkflowRequestBodyFilesField.StartWorkflowRequestBodyFilesFieldBuilder().type(StartWorkflowRequestBodyFilesTypeField.FILE).id(workflowFileId).build()), new StartWorkflowRequestBodyFolderField.StartWorkflowRequestBodyFolderFieldBuilder().type(StartWorkflowRequestBodyFolderTypeField.FOLDER).id(workflowFolderId).build()).type(StartWorkflowRequestBodyTypeField.WORKFLOW_PARAMETERS).build())

Arguments

  • workflowId String
    • The ID of the workflow. Example: "12345"
  • requestBody StartWorkflowRequestBody
    • Request body of startWorkflow method
  • headers StartWorkflowHeaders
    • Headers of startWorkflow method

Returns

This function returns a value of type void.

Starts the workflow.