Assigning data in a workflow

Prev Next

The workflow activity Assign data can automatically add, modify, or remove index data of any document stored in DocuWare.

Example: An invoice is approved in a workflow. The Assign data activity enters the correct purchase order number from the CRM into an index field. The invoice is now directly linked to its purchase order for easy tracking.

1. Adding an Assign data activity

  1. Go to DocuWare Configurations > Collaboration > Workflow Designer.

  2. Click the button New Workflow or Edit to open a new or existing workflow in the canvas.

  3. In the left sidebar, click Assign data.
    Don’t worry about the red asteriks in the Assign data configuration dialog for now. They show that the configuration is not complete and will vanish when all settings are adjusted.

2. Configuring a data assignment

A data assignment is specified by the destination and source.

The activity Assign data populates the destination, which can be any index field of any document in DocuWare.

The source is the origin of the data that will be written to the destination. A source may be the index criteria of an archived document or even external data.

2.1 Specifying the destination

  1. In the dialog Assign data dialog switch to the tab Data.

  2. Click the link Add first assignment.

  3. Click the link Set data assignment.

  4. Select a Destination type.

  5. Select a Destination entry.

See the list of destination types below for more information.

Notes:

  • The destination types Document index, Global variable and Index table always target an index field of the workflow document.  

  • The destination type File cabinet can address both the workflow document or any other document stored in DocuWare.

  • Only one index field can be addressed with each data assignment. To target multiple index fields, add the same count of data assignments in the Data tab. Or use table assignment.

  • Depending on your selection of the Destination type, the options in the Destination entry field may vary. See the tabs below for more information:  

Destination types overview

When the destination type is set to Document index, the Assign data activity adds or modifies the index value of the current workflow document.

As Document index > Destination entry you may choose an index field of the document in the workflow.

When the destination type is set to Global variable, the Assign data activity populates a variable. The values entered in the variable can then fill the index fields of the workflow document.

In addition to that, the variable can be re-used in multiple workflow steps without that you need to add the data again.

As Global variable > Destination entry you may a variable you have created in the variables tab.

When the destination type is set to Index table, the Assign data activity adds or modifies data in one index table of the workflow document. An index table is an index field structured as a table.

As Index table > Destination entry you can select the the columns, rows or specific fields of the chosen index table to be added or replaced.  

More information about assigning index tables is coming soon. Until then, refer to the help of the earlier versions of Workflow Designer for basic information.

When the destination type is set to File cabinet, the Assign data activity  adds or changes index data to any document in any file cabinet.

For File cabinet, there is no Destination entry needed. Click the link Write SELECT statement instead.

  • There are no SQL skills required to build the query. Your filter settings will be transformed in SQL automatically.  

  • Select the file cabinet and the index field via a drop down list.

  • Define the document by filtering.  

  • To cover more complex use cases, you may also use expressions for filtering. To do this, activate the option Advanced query.

The destination type File Cabinet may change only ONE index field per data assignment.

When the destination type is set to Fill area, the Assign data activity populates a merge form with index data.
As a prerequisite, the merge form has to be selected in the workflow trigger conditions.  

As Fill area > Destination type select the merge form you have specified before as workflow trigger.

If the fill area is linked to a form field, any existing values will be overwritten.

2.2 Specifying the source

Source type and Source entry are greyed out until you enter a destination for the assignment.

Enter a Destination type and Destination entry first to be able to add a source:  



Notes:

  • The source types Document index, Index table and File cabinet are referring to index data stored in DocuWare.

  • You may also enter fixed values, expressions or variables to fill the index fields of the destination.

  • To embed sources from outside DocuWare use Local database connection/External sources.

  • Only these entry types are shown, which are appropriate to the destination.

  • For example, for a number field, only number index fields like amount or document ID are provided.

Refer to the list below for detailed information about the sources types:

Source types overview

When the source type is set to Global variable, the Assign data activity adds a value from a global variable to the destination.

As Global variable > Source entry choose a variable you have created in the variables tab.

A global variable as source type is NOT available for the destination type Index table.

When the source type is set to Index table, the Assign data activity writes data from any index table in DocuWare to the index table of the current workflow document.  

The source type Index table is only available for destination type Index table.  

As Index table > Source entry select an index table of the current workflow document. Then, specify the table data.

When the source type is set to File cabinet, the Assign data activity adds Index data from any file cabinet to the index data of any document stored in DocuWare.  

For File cabinet, there is no Source entry needed. Click the link Write SELECT statement instead.

  • There are no SQL skills required to build the query. Your filter settings will be transformed in SQL automatically.  

  • Select the file cabinet and the index field via a drop down list.

  • Define the document by filtering.  

  • To cover more complex use cases, you may also use expressions for filtering. To do this, activate the option Advanced query.

When the source type is set to Fixed value, the Assign data activity adds a fixed value into the destination.

For Fixed value > Source entry enter the values. Use values which are appropriate to the destination.
For example, if a date field is defined as destination, only dates are possible as source, not text or numbers.

When the source type is set to System variable, the Assign data activity adds a the value from a system variable to the destination.

As System variable > Source entry, select a system variable e.g. the last decision maker.

Notes:

  • System variables are defined by DocuWare and cannot be changed.

  • System variable as source type is not available for the destination type Index table.

When the source type is set to Expression the Assign data activity enters a user-specific value to the destination, e.g. a combination of different variables.

For Expression, there is no Source entry needed. Click the link Write Expression to enter an expression.

When the source type is set to Local database connection, the Assign data activity adds a value from a source outside of DocuWare to the destination.

  • The dialog is labeled for DocuWare Cloud: Local database connection

  • The dialog is labeled for DocuWare on-premises: External source

For Local database connection, no Source entry is needed. Click the link Write SELECT statement to enter an expression.

  • There are no SQL skills required to build the query. Your filter settings will be transformed in SQL automatically.  

  • Select the database and the columns name via drop down list.

  • Define the document by using the query builder.

  • To cover more complex use cases, you may also use expressions for filtering. To do this, activate the option Advanced query.

Notes:

  • Your filtering will be be transformed in SQL automatically.

  • To enable rapid data synchronization between Cloud and on-premise systems, install the Local Data Connector in your Cloud system. This is possible if the DocuWare Desktop Apps were installed from within a Cloud organization.

  • In on-premise systems, the Connector is not available. In the External data dialog, the Local Data Connector enables you to select a local database connection.

3. Handling errors

If the automated data assignment fails because for example the CRM is down, you can configure the workflow to direct the document to another automated action, such as sending an email notification to request to manual enter the missing information.

Specify the error handling to prevent loops:

  1. Go to Assign data > Action to the tab Errors.

  2. Choose one of the following options:

    • No error handling: This option is acitvated by default.

    • Restart workflow: The document is routed through the workflow steps from the beginning again automatically.

    • End workflow: The document is routed to the end of the workflow automatically. All changes made up to this point will remain.

    • Go to step: This option adds an Error output to the Assign data activity. Connect it with another activity to route the workflow document manually: