Note: In older versions of Asset Bank 'folders' were called 'access levels'
The workflows.xml file defines the workflows that are available in the system. It specifies the states that a workflow has, the transitions that can be made from those states and who the states and transitions are visible to in Asset Bank.
Structurally, it has a root node of <workflows> which contains a list of <workflow> elements each with the following
attributes...
- name: a unique name for the workflow.
- description: a user friendly description of the workflow (i.e. National approval workflow) that is used where necessary on the application front end.
There must be a <workflow> element with the name 'default'. This is the workflow that will be applicable to any folders that don't have a specific workflow selected for them on the Admin > Folders > [edit] page.
Each <workflow> element is a collection of <variation> elements. A <variation> is a group of <state> elements that are applicable for a certain type of asset. The <variation> elements enable you to have different states for different asset types within the same workflow (so video assets could be setup to follow one set of states for a workflow whilst image assets follow a different set of states).
Each <variation> has the following attributes:
- name: a unique name for the variation
- for: a list of asset type ids that the variation applies to (or '*' if the variation is for all types)
The <variation> elements each contain a list of <state> elements with the following attributes:
- name: a unique name for the state within the workflow
- description: a user friendly description of the workflow state (i.e. Asset Requires Approval) to be displayed to users on the front end
- initial: whether this is the state that an asset enters the workflow at
- visible-to: the users that this state is visible to. Defined either by a list of group ids or the word 'approvers' meaning all groups with approval permission on the folder/workflow combo in question
<state> elements are a collection of <transition> elements, <alert> elements and <help-text>.
<help-text> elements just contain text content to explain the current state to users on the front end.
<alert> elements define actions + emails that are executed and sent to a certain group of users when an assets enters the state in question. They are made up of the follow attributes...
- name: a unique name for the alert
- send-to: who to send the alert message to
- handler: the processor (java component) to execute when running this alert (to perform an actions above and beyond sending an email) - this attribute is for custom functionality and is usually only used by our developers
- template: the email template to use for the alert
<transition> elements define what the next state an asset in the current state can be moved to. They have the following attributes...
- name: a unique name for the transition within the current state
- description: a user friendly description of the transition to be shown to users on the front end
- next-state: the name of the state that this transition moves the asset to
- has-message: true or false to indicate whether a message (i.e. from one user to another explaining the reason for the transition) is required when this transition is executed
They are made up of <help-text> and <confirmation-text> elements. <help-text> contains text content that will be displayed to the user if they request help about the transition and <confirmation-text> elements contain text that is shown to users after the transition has been executed.
The best way of getting a handle on how to create workflows is to review the existing workflows in the workflows.xml file. You should only edit this file if you are confident that changes won't have a negative impact on assets already in your Asset Bank. If you are unsure about editing this file, please get in touch.
Comments
0 comments
Please sign in to leave a comment.