cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a Unity Form and Retrieving Its Data from Workflow

Scott_Madsen
Champ in-the-making
Champ in-the-making

I have a System Task created in Workflow on a Unity Form that isn't working how I think it should.

The idea is that a user will have already filled out and saved the form by the time they need my System Task. The user will open this previously saved form and select my System Task. Here's what it's supposed to do:

  • A new Unity Form (different doc type) will appear with a field for a new account number.
  • When the user clicks "Save", I need to update all documents related to the old account number and update them with the new value

Here's how I'm trying to accomplish that in Workflow:

  • I have a "Create Form" action that creates the new update form and checked the "Display for input" box. (this appears to work fine)
  • I then have a "Related Item Exists" Rule that checks to see if the form was created. (I'm suspicious that this isn't working right because this is my first time setting up portfolio relationships. Either way, it's evaluating to true like it should)
  • I have the "Use Related Items for Tasks" box checked so it should change the focus to the related items returned to execute everything under the "On True" but it doesn't change focus.
  • On True, it's supposed to do a "Copy Keywords from/to Related Item" where it updates the account number keyword to the new value. (This doesn't work currently)

I think my biggest problem is that it isn't changing focus to the update form even thought "Use Related Items for Tasks" is checked. How can I identify what's wrong here?

4 REPLIES 4

Eric_Beavers
Employee
Employee

First suggestion is to use Diag Console to Trace the logic in realtime. I assume you are already doing this because you know it is going true. But it is always worth mentioning.

A few addtional ideas (just guessing here) based on the limited info you provided:

1. store the keyword in a Workflow Property before your Related Rule, then on Related Item Exists - true -set keyword from property

2. double check your TARGET: setting on each rule/action - the ones under the TRUE branch of Related Item Exists are actually reversed when using "Use Related Item for Tasks"

Example-

Related Exists? (Use for tasks)

Wrong Context

T- Replace Keyword Target:related

This should actually be

T - Replace Keyword (Target : Current)

 

 

 

 

Scott_Madsen
Champ in-the-making
Champ in-the-making

Thanks for the feedback, Eric.

To your first point, I am using the Diag Console as well as breakpoints to help me see what's firing. I'm extremely new to OnBase and Workflow in general as everything was initially set up by a 3rd party and I've just recently been tasked with attempting to make some changes so you'll have to forgive my ignorance.

When you say I should store the keyword in a property before my Related rule, how would I do that? If the currently targeted item is the original form, how can I grab the keyword value from the update form before the "Related Item Exists" rule?

Thanks!

 

Scott_Madsen
Champ in-the-making
Champ in-the-making

I think part of my confusion too is on how to set up the portfolio relationship and the "Evaluate to true when" section of the Properties pane. So, for example, if the update form has a doc type of "SYS - Update Form", how would I configure the portfolio relation?

Here's how I'm doing it now:

  • What type of related items with this relation find?
    • Content Type - Documents (this is the only option
    • Related Content Type - Documents (I could also select Entity Items or Workview Objects)
  • What primary Document Type should this relation apply to?
    • This is set to "All" right now. Do I need to select "SYS - Update Form" here? Or is the primary document the Unity Form this workflow is being launched from? If so, should my doc type selection be "SYS - Account Form" or whatever doc type the original form is?
  • How do you want to find related documents?
    • I have Document Type checked here with "SYS - Update Form" selected.
    • Under Keyword Mappings, I'm pulling the original account # from its scoped property and mapping the keyword "Original Account Number" to that property. My thought here is that it'll find all "SYS - Update Form" documents with the original account number keyword matching my propOldAcctNum property.

Then, for the "Evaluate to true when" section, I'm setting the operator type to "=" and using my propUpdateFormDocHandle property which holds the document handle for the update form. Honestly, I have no idea what this section is looking for since it doesn't tell me what's on both sides of the "=" operator... So, part of my question here is: What am I checking (probably incorrectly) is equal to propUpdateFormDocHandle?

Eric_Beavers
Employee
Employee

When you say I should store the keyword in a property before my Related rule, how would I do that? If the currently targeted item is the original form, how can I grab the keyword value from the update form before the "Related Item Exists" rule?

Action: Display HTML Form - store what the user types in a property. You can also leverage the rule Check Property Value to validate what the user types.

What primary Document Type should this relation apply to?

In many cases ALL is fine. It executes on the document that is either in the lifecycle or the system task is using. The only times a selection of  "all" does not work is when there are multiple document types executing or the logic is meant to search for duplicates.

Your mappings are hard to troubleshoot on this forum.… at this point I recommend leveraging Display Document or Display Message box  (you can show property values with %V{placePropNameHere} )actions to further debug what is being worked on. For example, you think the related document is the original form. Display Current Document in New window should prove if you are working in the correct context. You believe your property is correct. Display message box The value of myProp is %VmyProp will show you what it really is during processing (though Diag console also shows this too).

Also, I see you are using a scoped property. If this is the intent, you need to set every rule and action in the task list to be scoped, if just one of them still says session, it will break.