This service handles requests to either approve or reject a simple workflow action. It is written to handle
both Alfresco Share configured actions, but can be used independently for simple workflow handling in
other application contexts.
- Copyright:
- Copyright (C) 2005-2020 Alfresco Software Limited
- License:
- GNU Lesser General Public License, see: Open Source Licensing
- Source:
Mixes In
Members
-
approveFailureMessage :string
-
The notificatio message to display when a simple workflow cannot be approved. This will be displayed unless the approval request publication payload is configured with an action attribute containing a specific "failureMessage" value.
Type:
- string
- Default Value:
- "message.simple-workflow.failure"
- Source:
-
approveSuccessMessage :string
-
The notificatio message to display when a simple workflow is successfully approved. This will be displayed unless the approval request publication payload is configured with an action attribute containing a specific "successMessage" value.
Type:
- string
- Default Value:
- "message.simple-workflow.approved"
- Source:
-
i18nRequirements :object[]
-
An array of the i18n files to use with this widget.
Type:
- object[]
- Default Value:
- [{i18nFile: "./i18n/WorkflowService.properties"}]
- Source:
-
rejectFailureMessage :string
-
The notificatio message to display when a simple workflow cannot be rejected. This will be displayed unless the reject request publication payload is configured with an action attribute containing a specific "failureMessage" value.
Type:
- string
- Default Value:
- "message.simple-workflow.failure"
- Source:
-
rejectSuccessMessage :string
-
The notificatio message to display when a simple workflow is successfully rejected. This will be displayed unless the reject request publication payload is configured with an action attribute containing a specific "successMessage" value.
Type:
- string
- Default Value:
- "message.simple-workflow.rejected"
- Source:
-
startWorkflowPage :string
-
Type:
- string
- Default Value:
- "start-workflow"
- Source:
Methods
-
onApproveFailure(response)
-
Called when an approval could not be completed.
Parameters:
Name Type Description response
object Fires:
-
onApproveSimpleWorkflow(payload)
-
Parameters:
Name Type Description payload
object The payload containing the details of the workflow to approve -
onApproveSuccess(response, originalRequestConfig)
-
Called when an approval was completed successfully.
Parameters:
Name Type Description response
object originalRequestConfig
object The configuration used for the XHR request Fires:
-
onAssignWorkflow(payload)
-
Parameters:
Name Type Description payload
object The payload containing the node to assign a workflow to. -
onRejectFailure(response)
-
Called when a rejection could not be completed.
Parameters:
Name Type Description response
object Fires:
-
onRejectSimpleWorkflow(payload)
-
Parameters:
Name Type Description payload
object The payload containing the details of the workflow to reject -
onRejectSuccess(response, originalRequestConfig)
-
Called when a rejection was completed successfully.
Parameters:
Name Type Description response
object originalRequestConfig
object The configuration used for the XHR request Fires:
-
performAction(actionName, successCallback, failureCallback, action, item)
-
Makes an XHR call to perform the approve or reject action.
Parameters:
Name Type Description actionName
string The name of the action to perform successCallback
function The callback function to use if the action completes successfully failureCallback
function The callback function to use if the action fails to complete action
object Additional action configuration. This can be included to override success and failure messages item
object The item to perform the action on. This is expecte to have a "nodeRef" attribute. -
registerSubscriptions()
-
- Since:
- 1.0.32
- Source:
Listens to Events: