Home > Forum > Processes > Importing elements into a process that is not a dictionary process

Importing elements into a process that is not a dictionary process
0

Hi, I would like to import new elements into a process that is not a dictionary process, it is a list of employees, I know how to do it in a dictionary process using the import from Excels function, but in this situation I have no idea.

Regards
Darek

MVP

Hi Darek,
there is no ready functionality, which could do that, but there are few ways how you could achieve it.

1. Using global cyclic action with start a subworkflow action -> https://docs.webcon.com/docs/2023R3/Studio/Action/Workflow/StartManyWorkFlows/
This way you need to have source data in an SQL table, and store some kind of identifier, to check if specific row already have been created in Webcon.
List items are populated using actions on register paths.

2. Using REST API and powershell -> https://developer.webcon.com/docs/rest-api/
This way there is no need to create additional actions on Webcon side, you can specify all the data in request, but it still might require some additional paths.
No need to have origin data in sql, it could be an excel, csv, or even another rest api.


I wrote some time ago a series on that topic, you could read more here -> https://blog.lumenn.pl/importing-data-to-webcon-1/

In reply to: Paweł Tołoczko

i use mouse recorder in loop and then in reports in step https://docs.webcon.com/docs/2023R3/Studio/Workflow/Step/Path/Step_Paths#9-available-as-quick-path

Hi Darek,

When I need to do that, I prepare a small workflow with 2 steps, field for Business Entity (+ maybe other parameter that will stay the same for 1 batch), and an item list with the colums you need on the target workflow. Make The fieldtypes in the item list the same as in the targetworkflow/-form.

Map the item list colums according to your source file for import.

Then put an "Create subworkflow (SQL)" action on the path between the 2 steps, that creates 1 workflow for every line in the target process/workflow/form. Make sure you set it to "...unrelated to current workflow instance" to avoid creating subworkflows depending on the import.

The Query you need is used to map the values from wfelementdetails table to the target fields.
This is done by using the Fieldobjects, so in my statement each field is as follows:

Select [columnobject1 from item list] as [FieldobjectX in target workflow]...
The system translates this to e.g.:
Select DETAtt1 as WFDAttText1...
DET_WFCON in the where clause is the itemList object, and of course the DET_WFDID needs to match current workflow ID.

The hard join through where clause with DET_WFDID = WFD_ID is used to get the values that are in the import workflow header, in my case the company is not in the item list, so its a field in wfelements. (you can see in query preview)

I usually run a small batch for testing to prevent you from having to delete too much if things go wrong. Testing in DEV or TEST is not a bad idea either ;)

Works like a charm for me. I have imported 700 colleagues, more than 9000 suppliers for several companies, and some other stuff.

BR
Chris