Recalling (Cancel) a workflow
You can recall (cancel) a workflow after it has been launched. Use the
RECALL object method on an action set object.
The syntax is:
Dim rc as DataSet = ObjMethod(symbol, code, “ObjectMethod”,"RECALL")
This workflow cancels the selected workflow from the Views tab of a formula:
Function wf_start() As Long
ObjMethod("", "", "ObjectMethod", "RECALL", "")
MessageList("Leaving RECALL-02. _ObjectKey = ", _ObjectKey)
End Function
The
RECALL performs the same steps that the
Workflow Maintenance form performs when the workflow
status is
3-Canceled. Each WIP step is given a status of
2-Closed.
You can send email to notify the user that the formula approval has been recalled. See Notify.
Set up a View for workflows to see the workflows that have been launched against an object. Then, you can launch any workflow for a selected workflow-in-progress. For example, use this query for a formula view.
SELECT distinct W.ActionWIP_ID, A.ActionSet_Code, A.Description, S.Due_date
FROM FsActionWIP W, FsActionWIPSteps S, FsActionSet A, fsFormula F
WHERE S.ActionWIP_ID = W.ActionWIP_ID
AND W.ActionSet_code = A.ActionSet_code
AND F.Formula_id = [%1]
AND S.TARGET_OBJECT_KEY = F.Formula_code + '\' + F.Version
From the
Reports tab, you can launch a
Recall workflow for a workflow-in-progress instead of
for an object. Select a workflow and click
. The
Launch Workflow form opens normally, as if it were
launched for a business object.
Select a Recall Workflow action set. After the Recall workflow has run
on
WIP ID 5330, the status of the workflow is
Cancelled.
The Queue Status of the step is Closed.
You can edit the workflow-in-progress. In the Object page, select . Then, click the Workflow ID link to open the Workflows in Progress page.