Type = How-tos, ; Topic = OPUS Solution Environment,;Persona = Solution Designer,; Orchestration = Manufacturing, Logistics, Commerce, Transportation, Clinical Supply,; Function = Supply Chain, IT, Operations, Regulatory Affairs, Quality, Commercial, Pharmacy, Project Management, Finance, Procurement, Spare 2,

Configure workflows

A workflow defines the sequence of states that an object (e.g. a business transaction object) moves through during its lifecycle. Each state (e.g. Draft, In Review, or Approved) represents a stage of progress, and transitions occur based on specific actions or conditions.

Solution Designers can search for, view, and configure workflows in a Company Solution. Workflows enhance business process management by ensuring efficiency and consistency, guaranteeing that objects of the same type move through the same base states and transitions without users needing to configure separate workflows for each object. At the same time, configuring workflows also provides flexibility, allowing the workflows in a Company Solution to continue to evolve in conjunction with the company's processes and business needs.

A typical workflow consists of the following components:

  • States – Represents the current position of an object within the workflow. They include base states and can incorporate sub states if needed. Base states are the primary states that an object can occupy. Base states are defined by the application developer and cannot be customized by solution users.
  • Sub state – Define substate within each base state to provide more detailed tracking of the process.
  • Transitions – Defines the permissible paths between states and guides the object through the workflow.
  • Post-Transition Actions – These actions execute when a transition occurs, allowing for additional logic to be applied during the workflow.

There are two types of workflows:

  • Standard workflow – Includes a predefined sequence of states and transitions for an object type. These workflows are commonly used across various business processes.
  • Business object workflow – Extends a standard workflow to support unique requirements. It provides configuration options and flexibility to adapt the standard workflow model to specific business needs.

Before performing any actions on the workflow, ensure the following:

  • If you have access to multiple companies, make sure you have the correct company selected in the TraceLink Account menu.

  • The company solution is in the Edit state.

Add and edit a sub state

Solution Designers add sub states within a base state to modularize existing workflow logic and tailor it to meet specific business needs. For example, a base workflow includes a state called Pending Approval, while sub states such as Pending Approval by Product Architect or Pending Approval by CTO can be added to enable scalable and reusable approval processes. Only add substates when they are relevant and necessary for the business context.

Add, edit, and remove a transition

A transition defines how an object moves from one workflow state to another. Each transition represents a single step in the workflow, such as moving an object from Draft PO to Pending approval or from In progress to Done.

Transition conditions control whether a transition is allowed to occur. A condition is a JavaScript expression evaluated at runtime. The transition proceeds only when the expression returns true. Conditions are typically used to enforce business rules (for example, blocking a transition when a required attribute is empty or exceeds a limit). Transition conditions are implemented as pre-transition conditions and must be written as a single line of code. Multi-line expressions are not supported and fail at runtime.

Transition actions are often called post-transition actions and they run automatically after a transition completes successfully. Actions allow the workflow to perform follow-up logic, such as creating related objects or updating attributes. Together, transitions, transition conditions, and transition actions provide fine-grained control over both the path an object takes through its workflow and the business logic executed before and after each step. This enables robust workflow automation, including sub states, conditional routing, and post-transition processing.

Example: Restrict transition access and automate object creation

In this example, only authorized users can perform a transition. When a transition occurs, the post–transition logic automatically creates a new object.

Before you begin

  • Identify the permission required to perform the transition.
  • Identify the target workflow state and the object type you want to create in the post–transition action.

Understanding funtions and objects used in the example

 

Tag end