Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

Workflow Table Name logic understanding

Avatar

Level 2

Hi Folks,

 

Can we figure out the logic of table name which gets created in the backend database when we run a workflow from a frontend console?

 

Previously, we were able to identify the table name using the workflow primary key id. Table name follows the below pattern

"WKF<Primary Key ID>%"

 

But, recently our auto sequence has exhausted, and our DBA changed the sequence range to the negative number. so, now whenever we create the new workflow, the primary key of workflow gets generated as negative number. and table name is not matching with the primary key of the workflow.

 

Regards,

Nitesh Anwani

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hello Nitesh,

Please try below:

Add 4294967296 to your workflow primary key and see, if it matches the WKF<xxxxxx>

For example: If your workflow primary key is -11111
Workflow table name would be WKF4283856185
4294967296 + (-11111111) -> 4283856185

In case, you see a different table name please share with us

1. your DB engine

2. two pairs of Workflow Primary Key; ACC generated Workflow Table Name.

Hope this helps!

 

View solution in original post

4 Replies

Avatar

Level 4

Hi @nitesh_anwani ,

 

There are some default variables set while executing the workflow. Have you tried using the variable vars.tableName which hold the name of the worktable?

Avatar

Level 2

Hi @Krishnanunni ,

 

We have more than direct access to the backend databased, because it hybrid solution. and In database, we can see there are more than 2500 tables starting with table name "WKF". In our campaign, we have more than 10000 workflows. and It is very difficult to check each workflow instance variables.

 

That's why we are trying to figure out the logic of table name generation against the workflow.

 

Infact, we have checked by creating few new workflows, and by comparing the table name and with the workflow primary key. but, didn't got any luck, there is no consistent pattern.

 

Regards,

Nitesh Anwani

Avatar

Level 4
Hi @nitesh_anwani, I am not much familiar with hybrid solution. Does writing the value of vars.tableName and workflow internal name to a csv file or a JSON file during workflow execution helps?

Avatar

Correct answer by
Employee Advisor

Hello Nitesh,

Please try below:

Add 4294967296 to your workflow primary key and see, if it matches the WKF<xxxxxx>

For example: If your workflow primary key is -11111
Workflow table name would be WKF4283856185
4294967296 + (-11111111) -> 4283856185

In case, you see a different table name please share with us

1. your DB engine

2. two pairs of Workflow Primary Key; ACC generated Workflow Table Name.

Hope this helps!