Behind the scenes

How is it done in CLOUDFLOW?

The order portal = customized HTML page

The order portal where Chip places his order is an HTML page that was customized for Reynholm Industry Brands with PAGEBUILDER. It is protected with a scope so that Chip can exclusively land on a private page that is restricted from navigating to other CLOUDFLOW pages.

When Chip opens the page, he fills in the form and submits the file. This initiates a workflow that creates a Job.

See Pagebuilder for more information on how to build custom HTML pages with integrated possibilities to start a workflow.

The workflow

The Start From Kiosk workflow (Submit Job) in this use case is built up as follows:

The nodes are configured as follows:

Start From Kiosk

Named Start From Kiosk (Submit Job). This node makes sure that the workable is created when Chip uploads a file and selects Submit. It has the following specified parameters:
  • Name: Request For Proof.
  • Category: Jobs.

    This will make sure the system creates a Job.

  • KIOSK parameters:
    • A required Text field with (variable) Key jobid and Label Job ID.

      This will create a variable jobid when Chip enters the requested parameter Job ID on the order portal.

    • A required Text field with (variable) Key customerName and Label Customer Name.

      This will create a variable customerName when Chip enters the requested parameter Customer Name on the order portal.

    • A required Text field with (variable) Key jobDescription and Label Job Description.

      This will create a variable jobDescription when Chip enters the requested parameter Job Description on the order portal.

    • A Number field with (variable) Key runQuantity and Label Run Quantity.

      This will create a variable runQauntity when Chip enters the requested parameter Run Quantity on the order portal.

  • Number of files: One.
  • Enable upload: selected.

    This enables Chip to upload the file that will be processed by Wernham Hogg Offset.

Create Job

This node makes sure a Job is created when Chip uploads a file and selects Submit. It has the following specified parameters:
  • Job Type: PageBuilderExercise.

    We will use this Job Type later to filter on this type of job.

  • Name: customerName-jobid.
    The name of the Job is built with two variables:
    • customerName: a custom variable created when Chip enters the Customer parameter in the order portal. It is a consequence of the KIOSK parameters in the Start From Kiosk node.
    • jobid: a custom variable created when Chip enters the Job ID parameter in the order portal. It is a consequence of the KIOSK parameters in the Start From Kiosk node.
  • State: IN REVIEW.

    This will set the Job's initial state to IN REVIEW.

  • Description: jobDescription.

    A custom variable created when Chip enters the Job Description parameter in the order portal. It is a consequence of the KIOSK parameters in the Start From Kiosk node.

  • File: All files from node previous Node.

    The variable All files from node previous Node will make sure that a small preview icon of the file is shown when viewing the Job Details.

  • Define (custom) data to be assigned to the created job:

    will store the custom data that Chip entered when submitting the Job to the database document for the job:

    PATH Value
    custom.jobId jobId
    custom.customerName customerName
    custom.jobDescription jobDescription
    custom.runQuantity runQuantity

Set Variable

Named Set Variable Job ID. This node will set a variable in the workflow for the current Job.

Name Type
newJobId Job ID

Hold in KIOSK

This node will make sure that Dale can decide in KIOSK whether the file is OK for production or not. It has the following specified parameters:
  • Viewable files: All files from node previous Node

    This will make sure that the file can be opened in PROOFSCOPE.

  • Routing labels:

    • OK, TO PRODUCTION

      This will create a decision button OK, TO PRODUCTION in KIOSK and make sure that the workable is directed to the Job in Production node when Dale selects this decision button.

    • NOT OK, BACK TO CUSTOMER

      This will create a decision button NOT OK, BACK TO CUSTOMER in KIOSK and make sure that the workable is directed to the Job in Error node when Dale selects this decision button.

Update Job

Named Set Job to Production. This node will make sure that the status of the Job is changed to the correct state. It has the following specified parameters:
  • Activity: Set State

    This will make sure the state is changed.

  • State: IN PRODUCTION

    This will set the state to IN PRODUCTION in Chip's order overview. With this information he knows that his order will be sent to production.

Update Job

Named Set Job to Error. This node will make sure that the status of the Job is changed to the correct state. It has the following specified parameters:
  • Activity: Set State

    This will make sure the state is changed.

  • State: ERROR

    This will set the state to ERROR in Chip's order overview. With this information he knows that his order will not be sent to production.

Script:

Named Set Files To Be Processed Variable. This node will set a variable filesBeingProcessed to the file originally uploaded by Chip.
var filesBeingProcessed = getParameters().files;
setResultVariables({filesBeingProcessed:filesBeingProcessed});

Wait

Named Do Some Work. This node waits 10 seconds to simulate work being done. It allows Chip to see the status of the Job change from IN PRODUCTION to INTERNAL QC. It has the following specified parameters:
  • Delay: 10 seconds.

Update Job

Named Set Job to Internal QC. This node will make sure that the status of the Job is changed to the correct state. It has the following specified parameters:
  • Activity: Set State.

    This will make sure the state is changed.

  • State: INTERNAL QC.

Hold in KIOSK

This node will make sure that Dale’s QC team reviews the file before routing for approval. It has the following specified parameters:
  • Viewable files: All files from node previous Node.

    This will make sure that the file can be opened in PROOFSCOPE.

  • Routing labels: Internal Approval.

Start Approval

After the Internal Approval happens, this node will begin a PROOFSCOPE Approval for Chip. It has the following specified parameters:
  • File to approve: All files from node previous Node.

    This will make sure that the file can be opened in PROOFSCOPE.

  • Variable name: approvalInformation.
  • User Names: Chip
    Note: A user named Chip needs to exist in CLOUDFLOW.

Select Job

This Node selects the Job to update. It has the following specified parameters:
  • Select by: Job ID.
  • Job ID: newJobId (this is the variable set earlier in Set Variable Job ID node).

Update Job

This node will set some data for the job, like the Approval ID and Approval user that we will use later in PAGEBUILDER. It has the following specified parameters:

PATH
custom.approvalId approvalInformation.id
custom.approvalUser Chip
custom.filesBeingProcessed filesBeingProcessed

Update Job

Named Set Job to Out For Approval. This node will make sure that the status of the Job is changed to the correct state. It has the following specified parameters:
  • Activity: Set State.

    This will make sure the state is changed.

  • State: OUT FOR APPROVAL.

Route After Approval

This node will wait for the approval to be accepted or rejected. It has the following specified parameters:
  • Policy: All Participants need to Accept (in this example, Chip is the only participant).

Update Job

Named Set Job to Approved. This node will make sure that the status of the Job is changed to the correct state. It has the following specified parameters:
  • Activity: Set State.

    This will make sure the state is changed.

  • State: APPROVED.

Update Job

Named Set Job to Rejected. This node will make sure that the status of the Job is changed to the correct state. It has the following specified parameters:
  • Activity: Set State.

    This will make sure the state is changed.

  • State: REJECTED.

The workflow

The Submit From Form workflow Get Approvals workflow which Pagebuilder calls to get a list of approvals for Chip’s in this use case is built up as follows:

The nodes are configured as follows:

Start From Web Request

Named Start From Web Request (Get Approvals). This node gets the approvals for the job and returns them to Page Builder to display. It has the following specified parameters:
  • Name: GetApprovals.
  • Workable name: GetApprovals_id.

    This will name the workable with GetApprovals_ followed by the id number.

Script

This node gets the list of approvals for the job and sets a result variable. It has the following specified parameters:
  • Input Files: (blank).
  • Script:
    var id = getParameters().variables.id;
    var result = api.job.get(id);
    var approval_id = result.custom.approvalId;
    if (approval_id !== undefined) {
            approval_id.split();
            var list_of_approvals = api.approval.list(["approval_id", "in", approval_id],
    []).results;
            setResultVariables({"result" : {"approvals": list_of_approvals }});
    }
    else {
            setResultVariables({"result" : {"approvals": [] }});
    }

Set HTTP Reply

This node returns the result variable back to Pagebuilder so it can display the results to Chip. It has the following specified parameters:
  • Status: 200.
  • Contents: result.

    This is the variable set from the Script node.

  • Delay: 10 seconds.