Adding the custom action to a WCM workflow
In this scenario, we will add a custom workflow action to a new content approval workflow, the effect of which will be that when the content item is modified and submitted for approval, a notification will appear on the content approvers' Activity Stream marked as "Action Required".
To achieve this we will:
1. Create a custom workflow action to post to the approvers' Activity Stream.
2. Add the workflow action to the approval stage of a workflow.
The WCM workflow that we will create is shown in the flowchart below:
Creating the WCM custom workflow action
To customize this workflow, we require a new custom workflow action which will be activated when an author submits content for approval.
1. Select the library, for example "CTC Demo" in which we want to create the custom workflow action and, in the desired WCM library, select New -> Workflow Actions -> Custom Action
2. In the form that appears, click Select Action
3. Choose the new custom workflow action that was deployed in the previous section, in this case Activity Stream Custom Workflow Action Factory
4. For the Date type field, select Date Entered Stage
5. Save the custom action and close.
Creating the approval workflow stage in "CTC Demo" Library
Create a workflow stage which invokes the custom workflow action when a content item enters the stage. To do this we need to complete the following:
1. Select the library in which we want to create the workflow stage and, in the desired WCM library, select New -> Workflow Stage
2. To add the custom workflow action to the stage, we select Add Workflow Actions
in the Run on Entering Stage section. If you have recently worked with the custom action, it may appear in the drop-down menu on the form - otherwise click on the Add Workflow Actions link and select the custom action in the resulting dialog as shown below:
This results in the workflow action being added as an action to execute upon entering the stage.
3. Select an approver. This will be the user that receives the notification that the content has been submitted for review. In this case Heather Reeds
. Click the Add
button to move her name to the Selected names pane on the right and click OK
4. We can now save and close the workflow stage.
Adding the approval stage to a publishing workflow
We now have an approval workflow stage with a custom workflow action that posts to the approvers' Activity Stream. Now we have to either create a new Workflow or add the stage to an existing workflow.
1. To create a new workflow, select the library in which we want to create the workflow action and, in the desired WCM library, select New -> Workflow Actions --> Workflow
2. In the workflow, Click Add Workflow Stages
, select the workflow stage created in the previous step and click OK
This adds the stage to the list of stages in the workflow. If this is a new workflow, add the Draft, Publish and Expire stages as appropriate. Ensure the new Approval stage is between Draft and Publish as shown below:
3. Save the workflow.
This section has described how to associate the Activity Stream custom workflow action action with a content item workflow. The next subsection describes how to associate this workflow with a content item and test the solution.