Removing final “favourites” page in ccstd workflows

Posted: 30 June 2009 in Content Center Standard interface, Teamsite, Worfklow models, Workflows

The last stage of a content standard submit workflow will most likely show you a “add to favourites” pages that, depending on your use, you may find completely redundant.

If you want to remove it from the workflow, then you’ll have to look at the wizard that takes you through it.

When you edit a SitePublisher page, you in effect load, a struts action that lets you edit your page (if you want more information on the action, you can find it here but it’s a bit of a long read). When you do this via ccstd, the next button will kick off a wizard associated with the next url, namely /iw-cc/command/iw.ccstd.submit with lots of query string parameters at the end.

Given this command, we apply some magic to find out the class behind the command on its other parameters, namely the wizard id if it has any. We find the command iw.ccstd.submit is defined in /httpd/webapps/content_center/WEB-INF/conf/ccstd/commands.xml.

    <command id="iw.ccstd.submit">
        <!-- Operation on CSDir and files. -->
        <operation id="Submit"/>
        <command-param id="wizard_id" value="iw.submit"/>

So now we know that the wizard defined as the “iw.submit” wizard is the one we’re after. Now we need to look at the innards of that wizard and tell it what we think of its favorites page…

The Wizard

As explained in this post, you can find the wizard quite easily using an easy technique. In our case, the wizard we’re after is in httpd/webapps/content_center/WEB-INF/conf/ccstd/wizard_submit.xml.

The first step in the wizard is the confirm step. It checks everything is ok and show you the next actions drop down list. We can get those from the “next”  elements (new_job, new_job_attach, transition_task, later). It transitions to the next step which is the tagging one (in my case tag_new_job, the metadata step).

After tagging has taken place, the submit command occurs (in the new_job step). This, in effect, transfers the control to the workflow that can be triggered by the submit event (defined in available templates and available_models).

To achieve this, it does a submit command that says “at the end of the workflow, run the iw.ccstd.wft_helper command”, which is the one doing the feedback. Unfortunately, it’s the same code that instantiates our workflow model so changing the success URL to something else would not work.

    <command id="iw.ccstd.wft_helper">
        <forward url="/ccstd/workflow/cgi_or_feedback.jsp"/>

After the workflow has transitioned and completed, the cgi_or_feedback.jsp forwards to the iw.ccstd_workflow_feedback command, which does display the iw-cc/workflow/feedback.jsp. What we can do is to overwrite the foward of the iw.ccstd_workflow_feedback command so that it closes the window, which is what we wanted all along. Note that we could (and probably should) also create a custom jsp that would look at the done_page and redirect us there if there is one, but this demonstration is now done.

    <command id="iw.ccstd.workflow_feedback">
      <!--<forward url="/ccstd/workflow/workflow_feedback.jsp"/>-->
      <forward url="/teamsite/common/close_window.jsp" />

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s