You are viewing limited content. For full access, please sign in.

Question

Question

Build workflow custom activity - how to access existing Data Source objects that listed in "external objects"?

asked on September 28, 2021

I am building a workflow custom activity, which requires accessing a user defined database table to pull out data and put into a dropdown list. I could hardcoded the underlying connection string but I would like allow user to choose an existing data source that like in "Query Data" activity or even a customized query following it. How can I achieve this inside the custom activity? Let me know if anyone has did this or point out it's not possible.

 

Thanks.

 

 

0 0

Replies

replied on October 1, 2021

If all of the data sources are on the same server you could write a stored procedure that takes the source as input and produces output in a common format.  If they are a fixed set of sources on different servers then you would have to conditionally run different query strings and place the results in a common set of predefined tokens.  If the user is specifying a data source at random that you have not identified as a source in workflow then I think you're toast as far as workflow is concerned.

1 0
replied on October 1, 2021

Hi James, thanks for the input.

What I am looking to build a self-contained workflow activity that takes user defined data source just as standard "query data" workflow activity, then use it to query underlying tables then populate some of the dropdown list.

To let this workflow activity read in special format string seemed strange to user and make it heavily relies on outside tokens.

Anyway use build-in connection string is ugly but could be quickest solution if Laserfiche doesn't provide access to "data source" objects.

 

 

0 0
replied on October 1, 2021

External objects are not available to custom activities at this time.

I think I will agree with James though. These data sources have to exist on the Workflow Server. So the most you'd be able to show the user is a preset list, they wouldn't be able to define one on the fly. Or if you want to have them define one on the fly, you could take their information and build your own custom connection string. If you go that route, remember that "Windows Authentication" is from the perspective of the Workflow Server service user.

1 0
replied on October 4, 2021

Thank you all for the input and I will take the work-around like you said: make all available data source in a custom table with defined key, then when user want to use the custom activity, all they need to do assign a key then pass the token to the activity to build up sub-sequent query based on return of connection string (from the table). 

Let's see if user like it or not.

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.