Go to 6.1 Publishing content to from WCM to IBM Connections using Social Media Publisher.
In this scenario, we will add a simple publish action to the default Content Template Catalog workflow, the effect of which will be that when an event is published by the workflow, a message will appear on Heather Reeds' connections profile as per the Social Network Configuration document created in the previous article.
In 6.1.2 Configure Credential Vault and Social Media Publisher Global Settings we created a credential vault slot called "socialWorkflowUser", which contains an administrative user with rights to edit access to all content that will be posted to Connections.
To achieve this configuration we will:
Create custom workflow actions to post and delete
Add those workflow actions to a workflow
The WCM workflow that we will customize is shown in the flowchart below:
Create custom workflow actions
To customize this workflow, we require two custom workflow actions:
Post to social networks
Delete from social networks
To do this we need to select the library in which we want to create the custom workflow action. Follow these steps:
1. In the desired WCM library, select New -> Workflow Actions -> Custom Action.
2. In the form that appears, click "Select Action" and choose the desired social media publisher action. The custom workflow actions are installed by the Social Media Publisher and several basic actions are supplied:
Delete - deletes a linked post from the specified social network (where supported)
Delete All - deletes a linked post from all configured social networks (where supported)
Next Stage - not used
Post - creates a linked post in the specified social network
Post All - creates a linked post in all configured social networks (where supported)
Untrack - removes the link between the WCM content item and the social network post for the specified social network
Untrack All - removes the link between the WCM content item and the social network post for all configured social networks
3. For our two custom workflow actions, we create two separate documents, using a different action each time:
Post to social networks - We use "Post All".
Delete from social networks - We use "Delete All".
The action "date type" must be set correctly, too. The value should be "Custom Action Date" so that custom logic in the workflow action executes to post to the social networks shortly after the content is published.
4. One completed, click "Save and Close".
Add custom workflow action to a workflow stage
Adding the custom workflow action to a workflow stage is straightforward and can be achieved by opening the desired workflow stage and adding the custom workflow action to the configuration.
Follow these steps to add custom worklfow action to a workflow stage:
1. Add the action we created above to the stage "Publish Stage" in the "CTC Process" library. To do this, we open the stage and click "Edit", which results in the form shown below:
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 to the bottom of the list of actions to execute, as shown below.
This order should be retained, so that the "Post to all social networks" action executes on the published content. If the social networks action is before the published action, the content will still be draft when the social media publisher fires. For draft content items to be posted, the "Enable Posting for Draft Documents" checkbox must be selected in the Social Network Configuration document.
3. We can now save and close the workflow stage.
4. This is repeated for the expiry stage, which results in a configuration as shown below. The expiry stage is not supplied with the Content Template Catalog, but we have simply added it to the default workflow.
The next step is to test this configuration, which is the subject of the next and final article.
Associated articles and topics
This article is one of several describing how to configure the social media publisher:
6.1 Publishing content to from WCM to IBM Connections using Social Media Publisher
This topic is part of the Pattern 3 description: