Skip to main content

Hi,

 

I have a very simple one level approval workflow integrated with a smartform.

The approver receives a worklist email once a user submitted the form with a link to that worklist item. But when the approver opens the link, there is an error message saying:

SmartObject property GUID is a required property for selected method read. Value must be set.

 

I have tried a few different ways. but it seems I cannot get the item GUID over. 

The form has two forms states. one for user submit request, the other for approver. 

 

at the approval state of the form, during initialization, the rules are following:

if current workflow is approvalProcess

  then complete the followin one after another

    then open approvalprocess worklist item

      then on procoess item view,

               enable comment text area control

     then one  process item view,

             execute the read method(with GUID from smartobject reference)

 

Does anyone know what the problem might be?

Thanks!

 

 

 

 

Hi, yanL,

 

When you open the SmartObject tester utility, to execute this SmartObject's read method, do you have to imput the GUID? If so, then you need to populate this on execution.

 

Also, where are you developing the workflow? K2 Studio or K2 Designer? Are you using a client event and then configuring an email notification?

 

Please provide more details.

 

Kind Regards,

MA


Hi YanL,

 

What GUID are you trying to get? the error states that you are not passing GUID to the Read method!!

what are you trying to read? 

 

the worklist item works but the GUID you are passing to the read method is empty or wrong, I think you need to add condition to check if the GUID is not empty then execute the read method


Hi, MA,

 

Thank you for the suggestion. 

 

Yes, I do have to provide GUID when test the SMO in the SMO Utility.

I used SmartForm Client Event in K2 Studio with default custom email settings.


Hi, Mustafa,

 

I am trying to get the GUID of the item that was submitted by another user so that  the approver can read that item info on the form.

Otherwise it is not pull the item data from the email link. I thought that is a require step to do in the form rule.

 

Are you suggesting once I have item reference set, I should not need to set that extra SMO read rule in the form? it should just work?


Hi,

 

Then I believe that when the initiator start the workflow, he/she passes the GUID to a data field in your process(workflow) and when the approver form initializes in the "Open ApprovalProcess worklist item" you are returning the GUID from the data field that already has the GUID to another control, then you pass this control to the input property in your read method. 

 

otherwise I don't think you have the GUID to execute the read method. 

 

is this what you are doing?


Hi,

 

Yes. 

After initiator submit the form, data is saved and a GUID is returned and passed to a datalabel on the form (for debugging purpose now).

Then that datalabel value is saved to a workflow GUID data field. (in the config of the rule: then start the process workflow ) (this is in submitform Form state).

 

When the forms goes to approval form state, when the form is initializing, rules are:

if current workflow activity is ApprovalProcess

open the process worklist item

enable comment text area

on process item view, execute the read method

(I am passing the form parameter which I passed PartGUID to, here. not the workflow datafield because I cannot find the workflow related dta in the context browser

when I defeine form rules in k2 designer. Maybe this is where the problem come from. How should I fix it?)

 

Thank you for your help!


It could be how I pass the GUID. The data is at view level. Once it is moved to the form level. My read rule can retrieve the data without any problem. So maybe workflow can only interact with form level data.


Hi YanL,

Form level View lvel, SmartForms doesn't care.

What you can do as a test is to create a DL on the view and map the return value to that DL instead of the one on the form, then on view intialise pass that DL value to the SMO property input.

Best practice I have found, that if the data that should be loaded is only on a View create all the rules and mappings on the view itself, then you only pass the value as a view parameter and initialise(In intialise is where the Read/List should happen)

If this does not work, do you mind creating a P&D package so we can fix the issue for you and see exactly where it is going haywire?

Regards
Pieter


Hi, Pieter,

 

Thank you for the information.

The problem happened again on two different views. One is working fine, the other cannot load any data even though the view form label and form data label were fully populated with the correct GUID. So what K2 support helped me to find out was the output mapping for the open worklist item rule somehow corrupted it is just all gray. so we created a new open worklist rule with correct output mapping to map the GUID data field. Then it is working fine. I am not sure how that happened. 

 

Hopefully, it will help someone else who has the same problem.

 

Yan


Reply