Loading...
 

Workflow (WebWidget)

Workflow (WebWidget)

Workflow of work orders
Workflow of work orders

Represents business processes as directed graphs. The business process runs from top to bottom. When you double-click on individual nodes, the states or transitions are opened and can be edited.

Use

Web(workflow, APP("workflow.html"), 0, 0, 100, 50)

Dependencies

  • workflow.html
  • workflow-directive.js
  • dependencies/
    • d3.min.js
    • dagre-d3.min.js
    • workflow.css

Message interface

When describing the direction, the WebWidget is divided into its two components. The WebWidget implemented in HTML, which implements the presentation logic and user interaction in the browser, and the WebWidget implemented in InstantView, which supplies the other side with the data from ClassiX and controls it.

Name Parameters Description
Push News (IV→HTML)
data Data This message passes a Data Object to the Web widget as CX_JSON_OBJECT and contains all the data needed to draw the diagram. This message can be sent as often as required to update the data and display options, if necessary.
Events (HTML→IV)
INITIALIZE_SOCKET - The first message that the WebWidget sends once it has initialized. This indicates that the WebWidget is ready to receive and process push messages.
DOUBLE_CLICK_SOCKET JSON string

InstantView is notified that the corresponding node has been double-clicked. Depending on whether a state or transition is double-clicked, a JSON string of the following format is passed

State: {type: "state", id: Identifier of the state}

Transition: {type: "transition", from: ..., to: ..., title: ... } See parameter explanation under The Transition Object

The data object

The data object is of type CX_JSON_OBJECT and contains all nodes contained in the graph. Each node is identified by an id, has an optional text and children.

Field Type Description
states ARRAY(STATE) Set of states (statuses) in the business process.
transitions ARRAY(TRANSITION) Quantity of transitions in the business process.

The status object

The status object is a CX_JSON_OBJECT, which represents a single state (status) node.

Field Type Description
id STRING | INTEGER Unique identifier of the state.
title STRING Text which is displayed in the status.

The transition object

The transition object is a CX_JSON_OBJECT, which represents a single transition node.

Field Type Description
from STRING | INTEGER Identifier of the outgoing state.
to STRING | INTEGER Identifier of the incoming status.
title STRING Text which is displayed in the transition node.