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

Question

Question

Forms workflow doesn't have BoundEntryID

asked on May 7, 2019

I'm running a workflow initiated by a Forms instance. Whenever my form gets to the workflow, this.BoundEntryID is -1, and I can't get a value for this statement:

DocumentInfo doc = (DocumentInfo)this.BoundEntryInfo;

Should I be accessing a different variable?

 

0 0

Answer

SELECTED ANSWER
replied on May 10, 2019

Does your starting rule have conditions to exclude the WORKFLOW user?

If not, check if this user was added to the "user exclusion filter" in the server's advanced options in the WF Admin Console

1 0

Replies

replied on May 7, 2019

Do you need to start this workflow from Forms rather than having a starting rule that triggers when Forms creates the PDF in the repository?

2 0
replied on May 8, 2019

This could almost work, but I need to know the email addresses of the approvers. That could be accomplished by saving the emails in the metadata, correct?

0 0
replied on May 8, 2019

Yes, that would work. Alternatively, if you have Forms save the submission and instance IDs with the document, WF can pull the field values from Forms. That way, if you change your mind about which form fields you want, you only have to change the workflow definition (and can retroactively go back a re-process existing documents).

2 0
replied on May 8, 2019

This is the approach I would use. Having the submission and instance IDs makes it much easier to go back and pull additional information from Forms when needed, and I use those values to locate documents created by Forms in workflows that are initiated by the same BP instance.

1 0
replied on May 9, 2019 Show version history

To save the submission and instance IDs, do I create a field that will contain these within the form?

 

While testing the starting rule, I couldn't get my form to initiate the rule, but other entries were able to. The rule I was using was just "Entry Type == Document", and I had inadvertently run it for every document created within Laserfiche, but nothing ran for my particular form when the PDF was created. I have since limited to just the repository where the PDF is being stored. I can't figure out why the rules didn't run on my entry.

0 0
replied on May 9, 2019

These are built-in variables, so you do not need to add fields on the form itself.

In the Save to Repository task, when you assign metadata to the Form, the instance ID and last Submission ID will be available in the variable list.

1 0
replied on May 9, 2019

Ok. I'm still not sure why my starting rule isn't firing. I've modified the rule to start on Entry Moved to try and manually kick it off myself, but I haven't been successful.

0 0
replied on May 9, 2019

Keep in mind that starting rules become active about 30 seconds after you publish them.

You can check how the event evaluation went in the Subscriber Trace in the Workflow Admin Console.

As far as the rule goes, i think you want it to be triggered by document creation in whatever folder you set Forms to save documents in.

1 0
replied on May 9, 2019

I don't even see my repository listed in the subscriber trace. I'm not the Laserfiche administrator, so I'm not sure how I would add it.

0 0
replied on May 9, 2019

Ok, so it sounds like this Workflow Server is not monitoring your repository. You can add it from the Repositories node in the Workflow Admin Console if you have administrator rights to the Workflow Server. If not, you're going to have to track down your admin to do it.

1 0
replied on May 9, 2019

We were able to add the repository to the monitored repositories in the admin console, but after performing a few Entry Creations and Moves, none of those events show up in the trace log.

0 0
replied on May 9, 2019

Do you see a second tab with the repository name in the Subscriber Trace or just the one tab called "Events"?

1 0
replied on May 9, 2019

Our admin restarted the subscriber service and the new repo tab showed up. I'll continue testing.

0 0
replied on May 10, 2019 Show version history

After more testing, I can't see any of my Entry Created events in the subscriber log, but I can see them in the Live Event Viewer. If I manually created a document in my repository, my workflow will trigger, but not if I submit/approve in my forms process.

I've been working with our Laserfiche admin, but we haven't been able to determine why these things are occurring/not occurring. 

0 0
replied on May 10, 2019

You do see the events generated by Forms created a document in the Live Event Viewer, right?

What user is Forms using when creating these documents? Are you testing manual document creation as the same user?

0 0
replied on May 10, 2019

The entries that I manually created have a User name field with my domain account, while the Save to Repository task in the Process Diagram saves with the WORKFLOW user.

0 0
SELECTED ANSWER
replied on May 10, 2019

Does your starting rule have conditions to exclude the WORKFLOW user?

If not, check if this user was added to the "user exclusion filter" in the server's advanced options in the WF Admin Console

1 0
replied on May 10, 2019

This was it. So I've changed the Save task to use my profile to save documents, and everything kicked off as expected when I tested again. Thank you so much for your help!

0 0
replied on May 10, 2019

Remember that the task will be affected when you change your password.

0 0
replied on May 10, 2019

I thought about that, so we're going to use a service account. Thanks again!

0 0
replied on May 7, 2019

When a Forms instance starts a Workflow, there is no "Starting Entry" 

The "Script's Default Entry" is the value utilized by BoundEntryInfo, so if you have it set to use "Starting Entry" (the default) there will be nothing to reference.

In order to use BoundEntryInfo in your script activity, you'll need to use a Find Entry activity to get the entry you want to work with and use that as the default entry for your script activity.

 

1 0
replied on May 7, 2019

I have the variables from the Form instance. Is there anything I could use to use the Find Entry activity?

WorkflowTokens.png
0 0
replied on May 7, 2019

What document are you trying to locate?

1 0
replied on May 7, 2019 Show version history

I save the form to the repository as a PDF before the workflow task. I need to locate that PDF, export it to a shared drive, then send it for Adobe Sign signatures. When testing, I was utilizing a Start Entry ID of a document that already existed.

0 0
replied on May 7, 2019 Show version history

You will either need to assign some kind of identifier to the document's metadata and use a Search Activity, or store the PDF to a specific folder path and use that in a Find Entry, then use that reference in your script activity.

The "Save to Repository" task does not connect to the Workflow activity in Forms, so this would be the only way to link that document to the workflow instance unless the workflow was triggered by an "entry created" rule instead of being initiated by Forms (as Miruna mentions below).

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

Sign in to reply to this post.