Workflow Template

The idea

A Workflow template demands an action from a user. A workflow triggers a task. The user has to react to respond to the task.

A task can be a simple notification (there is a document for you) or an approval (the user agrees with the document or not). An approval always has a yes and no option.

Every step in a workflow template is called an action and can be sent to one or more users. When a group of users gets a task, it is sufficient that one person responds to the task.

Creating a notification workflow

You want to inform someone that there is a new document for him. He just has to indicate that he saw it. In that case, we use a notification.

  • You create a Workflow template and on the left side of the window you click the + sign below the action. You get an action Start Flow with the number 0 (first step of the flow).
  • You now indicate Notification, by clicking the + sign. You see that there is no next step. The Flow index sequence is shown in grey. When there is a next step, you see the number 1 in there.
  • In the ‘Message’ box, you type the text the user will see.
  • The number of days indicates how long the number he sees will remain green. When you leave 7 in the box, the symbol will be green for 6 days, the last day it appears in yellow, and when you are overdue it becomes red.
  • The last thing to do is to indicate the user(s) and/or group who get(s) the message.
  • That is all you have to do to create a simple notification workflow.
  • Save it, drag it on SMARTdoc, link it to a recognition and you are all done.




Creating an approval workflow

With approval templates the user has to say if he agrees or not. There is always a second step in an approval template.

Create the first step

  • Click on the + sign in action to start the flow.
  • Click the + sign in the Approval part.
  • You notice that you get a second step in the Flow Index Sequence: 1. In this part we will define what has to be done with the answers YES or NO.
  • Once again you indicate which user and/or group gets the approval message.
  • You modify the text the user gets and change the time if wanted.
  • The first step of the workflow is ready.


Second step in the approval flow: saying YES

Now you have to decide what happens when the user says YES in the workflow.

  • This is a new action: click + in the action part.
  • Type Flowindex 1 and select value True (you might have to push more than once the Value button).
  • The action that follows to a Yes can be a Notification or another Approval by someone else. When choosing approval you get Flow Index Sequence 2.


Second step in the approval: saying NO

What has to happen when the user indicates NO in the workflow?

  • This is a new action: click the + in the action part.
  • Type Flowindex 1 and select value False.
  • Once again this step can be a notification for someone or a new approval. When asking an approval, you will automatically get to step 2 in the Flow Index Sequence. This means you can create a complete chain of flows.


File actions in a workflow


Next to the notifications and approvals you can also add FileActions to a workflow.

FileActions can be different kind of actions:

  • Export: exports the indexes to a file
  • Start Flow: will start another workflow (be sure to type the right name)
  • SQL Query: type a statement to activate a change in the SMARTdoc database
  • Shell: start another program
  • Email: open an Email message that can be send to someone; you can define the recipient as well as the message
  • Webservice: triggers the special Webservice program.

Example of a SqlQuery

The SQL below changes the value of an index in the SMARTdoc database:

<FileAction Type="SqlQuery" TemplateName="" DestinationFolder="c:\temp" DestinationFileName="export.csv" SqlQuery="UPDATE [FileIndex]

SET [Data] = 'booked' WHERE [FileID] = @fileid AND [Name] = 'bookkeeping' AND [Data] = 'not booked'

This query will change the value from not booked to booked in the index bookkeeping.

Another example that can be used to change the security settings:


SET [SecurityID] = (

                select [ID]

                FROM [Template] T

                WHERE [T].[ID] = 123456


WHERE [ID] = @fileid

If you need help on creating file actions, don’t hesitate to contact us.


Article is closed for comments.