Ok, we will now step up in our Workflow game. We went through simple Workflow setup in previous article, we will now do a new one, with few additional details.
In this article we will focus on assignments in our Workflow states.
As always, if you need more data and details – look into M-Files documentation – https://www.m-files.com/user-guide/2018/eng/using_workflows.html?hl=workflows
We will again focus on the practical part, without too many theory. I done already articles that explain metadata, users, and simple workflows in M-Files. These are all bits you will need to follow this along.
Ok, let’s start.
I will not go through Workflow and state creating steps, since we already done that in Create and Manage Simple Workflow article.
I will just give you the details of my Workflow for this practice. Workflows in these articles are from M-Files documentation.
I created Assign Workflow
Single Assignment Workflow
Editing States
Draft State
Our first step will be to Edit Draft state. Select Actions tab, mark set Properties and click on Define
We will select Reviewers – I created Reviewers property along with Approver property in Create and Manage Simple Workflow article.
This is a prerequisite for Assign to User Action we will use later. We will fetch users from metadata – we will not be selecting users – but using Reviewers as metadata. It will be clearer down the line in this article.
Confirm everything with ok.
Next, up is In Review State
In Review State
Again, we will select Action tab of In Review state, and there we will mark Assign to user and click on Define
Click on Add…
Here is where our Reviewers will serve the purpose. We will select “User from metadata” and click on Reviewers.
Add
I entered description and confirmed everything with ok.
In the end, I added transition from In Review back to Draft in case something is missing. Save the Workflow.
Ok, let’s check out what is going on in M-Files Desktop.
Now, on Administracija1 Client I will create new Document with Assign Workflow. It is in Draft state, and I can add Reviewers to it.
I will add Racunovodstvo1 Account as Reviewer, push it into In Review state and click on Save
Status is now in Review
Let’s move to Racunovodstvo1 Client now to see if we have new assignment
There it is!
We can now push our document into Final state or back to draft
We successfully made transition to Final state
Ok, we resolved one more scenario and now know a few more things about Workflows, let’s go a little further with our knowledge.
Multiple Assignments Workflow
If we want to have more people in approval or assignment process, this is how we will do it.
Edit In Review State
We will edit Actions Tab in In Review state once more. This time we will unselect Assign to user and select Create separate assignments – Add…
Again click on Add button
Again “add users from metadata” and select Reviewers.
Before we close the screen – go to “Select assignment class” and select Assignment (you can also add other classes if you have them)
I went to the properties of Assignment class and opened Assignment Details of the tab – there are two options “Task assignment” – is assignment and allows only completion of the task, while Approval assignment allows user to approve or reject assigned task or document. Have that in mind. We will here go with Task assignment.
We will also add Placeholder for the title. Under Title… section, click on Add Placeholder…
I will select Name or title – Add as an ID
Additionally I will select Object Type and also add it as ID
In the end, after I added those two placeholders I will just type – review
I will also add some placeholders and text in Assignment description box – procedure is same as with title.
Confirm everything with ok, and exit from Editing In Review state.
If we click on the transition arrow in our Workflow, we can also edit transition. First we will edit In Review -> Final transition
On a trigger tab we will select “Trigger the state transition once all separate assignments are completed or approved”
Next, we will edit In Review -> Draft transition
This time will will select another trigger
Let’s save our Workflow and test it in M-Files Desktop
Everything works very nice after we got our document into In Review state – Name and Assignment description are just as we wanted them to be.
And I successfully got the document in M-Files of Racunovodstvo1 user and was able to complete and confirm it
Well, that is that – we now know how to create Workflows with Assignments. Step by step we are getting better in Workflow game.
My series of articles about M-Files
Server
M-Files how to configure Metadata
M-Files – users and user groups
M-Files – Create and manage simple workflow
M-Files – Create Workflow with assignments
M-Files – Create Workflow with Approvals
M-Files – Manage permissions for Workflows
M-Files – how to create and use document templates
How to backup and restore M-Files Vault
M-Files – How to enable access to M-Files through website
M-Files how to secure connection between server and clients (HTTPS)
M-Files Migrate from Firebird DB to Microsoft SQL DB
Desktop
Understanding M-Files logic + Overview of M-Files desktop
M-Files Creating Views for M-Files Desktop
M-Files how to save or modify documents?
M-Files How to share documents? How to save eMails to M-Files?