This site has moved to the integrated Appfire documentation and information site for our apps.

From February 2024 this site is no longer updated.

Take a look here! If you have any questions please email support@appfire.com

Tasks

Overview

Comala Document Management introduces the concept of "workflow tasks". They have similar functionality to Confluence tasks, but they don't clutter up the content.

While mostly a tool for content producers to interact with via the user interface, the workflow itself can also interact with tasks.

Creating tasks

Tasks can be created by users, but only in States which are taskable.

Tasks can also be created by the workflow itself, using the {task} macro.

{workflow:name=Tasks}
   {state:Taskable|taskable=true}
   {state}
   {state:Macro}
      {task:This was created by task macro}
   {state}
{workflow}

In this example, the user can create tasks in the Taskable state, but not the Macro state – because the Macro state is not taskable=true. When the workflow transitions in to the Macro state, the workflow will add its own task.

Page mode

In Page Mode be aware that adding the {task} macro to the current state of a workflow will often give unexpected results. That's because the {task} macro only works when the state is entered from another state. If you edit the {task} macro in to the state you are currently in it won't add any tasks; you would need to transition away from that state first, and then back in to it, for the tasks to be added.

Tip: You can use the Administrator state override to quickly transition between states.

Completing tasks

The {complete-task} macro can be used in an Event Trigger to automatically complete a specific task.

{workflow:name=Tasks}
   {state:Taskable|taskable=true}
   {state}
   {state:Macro}
      {task:This was created by task macro}
   {state}
   {state:Published}
   {state}
   {trigger:statechanged|state=Published}
      {complete-task:task=This task was created by task macro|comment=Auto-complete}
   {trigger}
{workflow}

In this example, transitioning to the Published state will automatically complete the task added by the Macro state, if it is not already completed. If it is already completed, the {complete-task} macro will just ignore it.

Note: Depending on the event which triggered the action, the Activity Report - Content may show the user as being Comala Document Management.

Transition when tasks completed

The {state} macro can automatically transition to another state when all tasks have been completed.

{workflow:name=Tasks}
   {state:Taskable|taskable=true}
   {state}
   {state:Macro|completed=Published}
      {task:This was created by task macro}
   {state}
   {state:Published}
   {state}
{workflow}


In this example, as soon as all tasks are completed in the Macro state the workflow will transition to the Published state.

When using this approach, ensure that the state which defines the completed parameter adds a task, otherwise there might not be any tasks to complete which would leave no way of exiting that state. An alternate would be to include the {state-selection} macro so the user can manually transition out of the state.

Make tasks disable a review

You can make the presence of incomplete tasks disable the Approve and Reject buttons in a review by using Conditions and Value References on the {approval} macro.

See: Make tasks disable a review

Note: The {state-selection} and {trigger} macros can be disabled the same way.

Notifications

By default, task assignees and page watchers will receive notifications about tasks.

Macros

Events

Tasks generate a numer of Events, which can be used to Trigger Actions.

  • taskcreated
  • taskassigned
  • taskcompleted
  • taskexpired

App configuration

SettingWhereNotes
Tasks ModeShould task actions be restricted to assignee and creator?
State's Task BehaviourWhen transitioning to another state, should remaining tasks be copied to it or discarded?
Task – AssigneeShould task assignees receive notifications about their tasks?
Task – Page WatchersShould page watchers receive notifications about tasks?

Examples

See also

Workflow Authoring Guide:

User Guide:

Reporting Guide:

Integration Guides:

Developer Guides: