tag:help-archives.hannonhill.com,2010-02-09:/discussions/how-do-i/15381-archive-an-asset-using-a-workflowCascade CMS: Discussion 2015-04-20T12:20:15Ztag:help-archives.hannonhill.com,2010-02-09:Comment/355198922014-12-11T17:05:01Z2014-12-12T12:48:28ZArchive an asset using a workflow<div><p>I'm attempting to archive an asset using a workflow and it won't
work. When I select an end date and submit it by bypassing the
workflow, the asset archives correctly and unpublishes. However, my
web authors don't have the option to bypass the workflow and I need
them to be able to archive their pages.</p>
<p>I've created a simple workflow with the following xml. This is
the 2nd workflow I've tried and neither have worked.</p>
<pre>
<code><system-workflow-definition name="Archive Job Posting" initial-step="initialize" >
<triggers>
<trigger name="com.cms.workflow.function.AssignStepIfUser" class="com.cms.workflow.function.AssignStepIfUser" />
<trigger name="com.cms.workflow.function.AssignToGroupOwningAsset" class="com.cms.workflow.function.AssignToGroupOwningAsset" />
<trigger name="com.cms.workflow.function.AssignToSpecifiedGroup" class="com.cms.workflow.function.AssignToSpecifiedGroup" />
<trigger name="com.cms.workflow.function.AssignToWorkflowOwner" class="com.cms.workflow.function.AssignToWorkflowOwner" />
<trigger name="com.cms.workflow.function.CopyFolder" class="com.cms.workflow.function.CopyFolder" />
<trigger name="com.cms.workflow.function.CreateNewWorkflowsTrigger" class="com.cms.workflow.function.CreateNewWorkflowsTrigger" />
<trigger name="com.cms.workflow.function.Delete" class="com.cms.workflow.function.Delete" />
<trigger name="com.cms.workflow.function.DeleteAndUnpublish" class="com.cms.workflow.function.DeleteAndUnpublish" />
<trigger name="com.cms.workflow.function.DeleteParentFolderTrigger" class="com.cms.workflow.function.DeleteParentFolderTrigger" />
<trigger name="com.cms.workflow.function.EmailProvider" class="com.cms.workflow.function.EmailProvider" />
<trigger name="com.cms.workflow.function.Merge" class="com.cms.workflow.function.Merge" />
<trigger name="com.cms.workflow.function.PreserveCurrentUser" class="com.cms.workflow.function.PreserveCurrentUser" />
<trigger name="com.cms.workflow.function.PublishContainingPublishSetTrigger" class="com.cms.workflow.function.PublishContainingPublishSetTrigger" />
<trigger name="com.cms.workflow.function.PublishParentFolderTrigger" class="com.cms.workflow.function.PublishParentFolderTrigger" />
<trigger name="com.cms.workflow.function.PublishSetTrigger" class="com.cms.workflow.function.PublishSetTrigger" />
<trigger name="com.cms.workflow.function.Publisher" class="com.cms.workflow.function.Publisher" />
<trigger name="com.cms.workflow.function.Version" class="com.cms.workflow.function.Version" />
</triggers>
<steps>
<step type="system" identifier="initialize" label="Start workflow" >
<actions>
<action identifier="initialize" label="Start workflow" move="forward" />
</actions>
</step>
<step type="system" identifier="archive" label="Archive" >
<actions>
<action identifier="archive" label="Archive" move="forward" >
<trigger name="com.cms.workflow.function.Merge" />
</action>
</actions>
</step>
<step type="system" identifier="finish" label="Finished" />
</steps>
<non-ordered-steps/>
</system-workflow-definition></code>
</pre></div>a-vennerstromtag:help-archives.hannonhill.com,2010-02-09:Comment/355198922014-12-12T14:08:12Z2014-12-12T14:08:12ZArchive an asset using a workflow<div><p>Hi,</p>
<p>If this is an 'edit' Workflow, I believe you may be able to
change your 'archive' step from:<br></p>
<pre>
<code><step type="system" identifier="archive" label="Archive" >
<actions>
<action identifier="archive" label="Archive" move="forward" >
<trigger name="com.cms.workflow.function.Merge" />
</action>
</actions>
</step></code>
</pre>
to this:<br>
<pre>
<code><step type="system" identifier="archive" label="Archive" >
<actions>
<action identifier="archive" label="Archive" move="forward" >
<trigger name="publish">
<parameter>
<name>unpublish</name>
<value>true</value>
</parameter>
<parameter>
<name>authorizing-type</name>
<value>system</value>
</parameter>
</trigger>
<trigger name="com.cms.workflow.function.Merge" />
</action>
</actions>
</step></code>
</pre>
Want to give that a shot and let me know if it works as you're
expecting?
<p>Thanks</p></div>Timtag:help-archives.hannonhill.com,2010-02-09:Comment/355198922014-12-12T14:33:26Z2014-12-12T14:33:26ZArchive an asset using a workflow<div><p>hm... I copied what you gave me and ran it through the workflow
and still nothing happened. It didn't unpublish or move to the
archive folder.</p></div>a-vennerstromtag:help-archives.hannonhill.com,2010-02-09:Comment/355198922014-12-12T14:36:37Z2014-12-12T14:36:37ZArchive an asset using a workflow<div><p>OK, I'll look into this some more when I have the chance and
I'll update you once I have more information. Thanks!</p></div>Timtag:help-archives.hannonhill.com,2010-02-09:Comment/355198922014-12-12T14:43:10Z2014-12-12T14:43:10ZArchive an asset using a workflow<div><p>I did a little looking around and I'm wondering if your publish
trigger name was wrong.</p>
<p>I changed it to this and it actually did something this time! It
unpublished my page, however, it didn't archive it for me. Any
thoughts on why that would be or how to get it to archive instead
of just unpublishing?</p>
<p><br>
unpublish true authorizing-type system</p></div>a-vennerstromtag:help-archives.hannonhill.com,2010-02-09:Comment/355198922014-12-12T14:55:39Z2014-12-12T14:55:39ZArchive an asset using a workflow<div><blockquote>
<p>I did a little looking around and I'm wondering if your publish
trigger name was wrong.</p>
</blockquote>
<p>Yep! I just noticed that as I was posting this followup. Good
catch! I had it matching the triggers I had in my local instance,
but forgot to check how you were referring to those triggers in
your Workflow.</p>
<blockquote>
<p>It unpublished my page, however, it didn't archive it for me.
Any thoughts on why that would be or how to get it to archive
instead of just unpublishing?</p>
</blockquote>
<p>This behavior sounded a bit familiar to me and I was able to
locate <a href="https://hannonhill.jira.com/browse/CSI-835">this
bug</a> which was just discovered recently. This appears to be
related to the problem you're seeing. I don't have an ETA for when
this will be fixed, but given that multiple people have run into
this I'm going to raise the priority on it.</p>
<p>Keep an eye on our <a href=
"http://www.hannonhill.com/kb/Release-Notes/">Release Notes</a> for
any new versions we make available to see when this issue is
addressed.</p>
<p>In the meantime, unfortunately I can't think of any way to get
this functioning while still using Workflow. I apologize for the
inconvenience.</p>
<p>Let me know if you have any questions.</p>
<p>Thanks</p></div>Timtag:help-archives.hannonhill.com,2010-02-09:Comment/355198922014-12-15T20:06:18Z2014-12-15T20:06:18ZArchive an asset using a workflow<div><p>Is there a parameter we can add to the workflow that will
uncheck the 'include when publishing' and 'include when indexing'
boxes so the pages don't accidentally get published again?</p></div>a-vennerstromtag:help-archives.hannonhill.com,2010-02-09:Comment/355198922015-01-05T16:05:58Z2015-01-05T16:05:58ZArchive an asset using a workflow<div><p>Unfortunately there isn't any way to interact with those options
via a Workflow. I bumped the underlying issue in priority again and
we'll look to implement the fix in the near future. I'm sorry for
the trouble in the meantime!</p></div>Tim