This post will show how to create a flow for uploading an image document to ProjectWise Design Integration datasource.
The flow will be used to quickly create a document from an image using a mobile phone. Let’s say there is an engineer who does field visits, he needs to load many pictures efficiently and then inform other teams members about new uploads. Without flow this task would require several steps, such as choosing a destination folder, filling document attributes, sending an email about the upload. This flow demonstrates how to simplify this action to just a few clicks.
Let’s use sample project BSI400 from ProjectWise sample dataset. The BSI400 project must be associated with a cloud project and a connection was created. To learn how to do this go to Preparing ProjectWise for Flow.
There are three folders for images in the project. The flow will have a preset to add an image to each folder quickly.
We need to know the following information to be able to create documents in these folders:
To make the flow more flexible let’s store this information as documents in ProjectWise . This way it can be modified at any time as needed. We have created a new environment ‘Flow Automation’ with two attributes for path and people. Name of preset will be document name.
Now let’s create a new flow. Each flow starts with a trigger. In our case it will be a mobile flow button trigger. To do this:
Pick the only available trigger ‘Manually trigger a flow’. Use ‘Add an input’ to create a text input with picklist containing preset names (the text here must match file name in automation folder exactly) and then add an image file input:
Next, let’s find a preset document to retrieve destination path and list of people to notify stored there. Click +New Step, search for ProjectWise. This will show all actions available with ProjectWise:
Choose ‘Find a document by path or GUID’ action. This will add a ProjectWise action to the flow. All ProjectWise actions require a ProjectWise Cloud project and a Work Area Connection (the first two parameters).
The third parameter is a path to the document. Let’s construct it as a concatenation of a known path to a automation folder (‘./99_Automation/Flow Image Upload/’) and name of preset, taken from the mobile button trigger.
The last parameter tells Flow about the environment of the document, so it can return correct attributes. Attribute values will be used as inputs to other actions.
The next step is to create a name for the new document and file. To keep it simple I will name it using a time stamp. Let’s use ‘Compose’ action from ‘Data Operations’ and a couple of functions for this.
Enter this expression to input of compose action: formatDateTime(utcNow(), 'yyyyMMddHHmmss'). This function will generate a timestamp string suitable for file name looking like this: 20181009111942.
Now we have all the information needed to create a new document. Let’s do that! First find a ProjectWise action called ‘Create a new document’ and then pick project and connection. Then fill in the general document properties:
Now once the document is created, let’s send an email notification. Let’s use Office 365 Outlook action ‘Send an email’.
It is now time to save and run the flow!
This example suggests storing preset information in ProjectWise. For this we have created a new environment. In many cases creating of a new environment is not desired. Possible alternatives are: using any other already existing environment to store this information, reading present information from Excel spreadsheet stored in OneDrive or SharePoint.
This post demonstrated how to use ProjectWise Flow connector to create new documents and how to store additional information required for Flow to run in ProjectWise.
Dominic, we have released thew first set of functions but more will come. Please watch for announcements here.To find out about current set of functions go to from.microsoft.com and locate ProjectWise connector.
How integrated is Flow with PW? Are all PW commands available?
For example, can Flow be used to update a converted .dgn / ISM / I.model / IFC automatically, when its originating file is updated?
This 'replication' would be helpful for a lot of BS 1192 workflows?
Or some things better done using PW Automation? It would be good to know.