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

Question

Question

Workflow starting rule and Get Metadata from:

asked on December 16, 2014

I have two different repositories: RepositoryA and RepositoryB. I have a Workflow definition that I want to use on both of those repositories. So, I add a profile for each repository to the Workflow definition and I add two starting rules (one for each repository) that have their own set of conditions. However, I find that when I set the "Get Metadata from:" field to RepositoryA in the first starting rule and set it to RepositoryB in the second starting rule, when I look at the rule for RepositoryA, or the rules on any of my Workflow definitions, it appears they're all looking at the metadata in RepositoryB. If I change the definition to look at a different repository, all other rules now look at the same repository I just selected.

Is this the way Workflow is supposed to work? Or can we have starting rules looking at various repositories? Maybe it's just remembering the last repository selected and not looking at the database to display the value in that field?

0 0

Answer

APPROVED ANSWER
replied on December 16, 2014

That's not going to work. Connection profiles in the workflow definition are not changed based on which repository the entry comes from. The first one profile is the default profile for the definition and all activities inherit it (though profiles can be changed for individual activities). The second one will not be used unless specifically set in an activity.

You need to make a copies of the workflow definition if you want to use it in multiple repositories.

1 0
replied on December 16, 2014

As for creating different starting rules for the different workflows, keep in mind that Workflow Starting Rules have no associated profile. The one in the wizard is just for ease of use and it is not saved per rule. Don't worry about what the "get metadata from" looks like. It doesn't mean anything with the actual running of the rules itself.

0 0
replied on December 17, 2014

So, if I understand what you said correctly, a Workflow definition can only work on one repository (whichever repository is specified in the connection profile), which means the starting rules for that definition will get metadata from that repository no matter which one you specify in the "Get Metadata from" field. And the Workflow definitions on a particular Workflow Server can be connected to different repositories (whichever their connection profiles specify).

0 0
replied on December 17, 2014

Not quite, but close. Activities can use different profiles, but these profiles cannot be changed on the fly based on starting conditions or entry properties.

"Get metadata from" field in the starting rule wizard is provided for convenience during configuration, it is not setting the repository to use for the starting rule. The notification event that comes from the Laserfiche server contains information about what repository the entry came from. The Subscriber checks that repository for any field values it needs to evaluate the starting rules. Then that entry information is passed to the instance if a workflow is started. The workflow definition should have a connection profile for the same repository. If it doesn't, you will get a warning that the 2 repositories are mismatched and the activities may fail trying to act against the wrong repository.

0 0
replied on December 19, 2014

Thanks so much for your responses.

The way it works seems pretty convoluted, and I can see why our customer was confused.

Is there a way to have the same Workflow definition work on multiple repositories or do I have to make a copy of each definition for each of the repositories I want it to work on? It would be nice to have one definition and have it work on any repository in the connection profiles.

0 0
replied on December 22, 2014

You have to make copies. Since the field definitions, usernames and folder structures are not guaranteed to be the same in all repositories, it is not really possible for one Workflow definition to gracefully handle multiple repositories. That's why the current design making copies and validating the definition against the current connection profile before publishing it to the server.

1 0

Replies

replied on December 16, 2014

Workflow Starting Rules have no associated profile. The one in the wizard is just for ease of use and it is not saved per rule. Don't worry about what the "get metadata from" looks like. It doesn't affect anything with the actual running of the rules itself.

replied on December 22, 2014

Thanks so much for the explanation!

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

Sign in to reply to this post.