We use cookies (just for analytics) on this website. If you continue we will assume you are happy with it. ok

BeBanjo

Back to index

Workflow

If your company is using BeBanjo’s Sequence product you can benefit from workflows. A workflow is part of a scheduling, and links a job resource from Sequence, with a scheduling in Movida.

In Movida land, a workflow looks like this:

<?xml version='1.0' encoding='utf-8' ?>
<workflow>
  <status>completed</status>
  <link href="https://sequence.example.com/api/work_areas/37/jobs/48394" rel="job" />
</workflow>

Workflows have a status attribute that represents the progress. Possible values are:

  • completed: all the tasks have been completed and all the materials (assets) have been received, i.e. the Sequence job status is either done, live, or passed.
  • pending: all tasks are pending and all materials (assets) haven’t been received, i.e. the Sequence job status is either pending or late.
  • in_progress: some tasks have been completed and/or some materials (assets) have been received, i.e. the Sequence job status is either pending or late, the tasks status is not not_received and the assets status is not pending.

Creating a new workflow

To create a new workflow for a scheduling you just need to POST an empty XML workflow representation to the proper URL. As explained above, that URL is in the link node whose rel attribute equals workflow in the scheduling.

For example, this POST would create a workflow (we’ll use curl’s @ option, which reads the data that is to be posted to the URL from a file):

$ cat workflow.xml
<workflow></workflow>
$ curl --digest -u robot_user:password -H "Content-Type: application/xml" -X POST -d @workflow.xml "http://movida.bebanjo.net/api/schedulings/46/workflow"

If everything runs fine, you will get a representation of the workflow with the status attribute which value is “sent”, which means that the scheduling has been sent to Sequence:

<?xml version="1.0" encoding="UTF-8"?>
<workflow>
  <status>sent</status>
</workflow>

After a few seconds you can check for the workflow in the same URL:

$ curl --digest -u robot_user:password -H "Content-Type: application/xml" "http://movida.bebanjo.net/api/schedulings/46/workflow"
<?xml version='1.0' encoding='utf-8' ?>
<workflow>
  <status>pending</status>
  <link href="https://sequence.example.com/api/work_areas/37/jobs/48394" rel="job" />
</workflow>

Please, refer to the job page to get more information about jobs.

Last updated March 31st, 2017.