1 2 Previous Next 25 Replies Latest reply on Apr 4, 2017 5:40 PM by Carl Wilson

    Regarding Workflow Designer : Get Entry Object

    Sanket Mhatre
      Share This:

      Hello,

       

      I am using Get entry object in Workflow designer. Obviously , I will do the get entry because i need some value from the fetched record. However if you use this object, there is single variable as 'Output' . You can't decode it further.. what data in which field.

      How to do that? reason is , In Service Broker, I want to create WO using 'Create Work Order' and then update WO using 'Set Entry'.

       

      Thanks,

      Sanket Mhatre

        • 1. Re: Regarding Workflow Designer : Get Entry Object
          John Gallagher

          Hello Sanket,

           

          Get entry returns key-value pairs, where key is a field name and a value is its value but it's not needed to update an entry, you would use setEntry directly. In setEntry there's a fieldValues parameter of type InputSet in which a key is a field name and a value is a field value so if you know what field you want to update (and in this scenario you have to know the field's name) you can use setEntry for this.

           

          Regards,

          John

          • 2. Re: Regarding Workflow Designer : Get Entry Object
            Sanket Mhatre

            Thanks John. (updated comment)

             

            Just to illustrate more,

            1. Create OOB WO (input : mandatory , output : entry id from work order interface form)
            2. Get the work order id from Work Order interface form. (input : Output of step 1 that is entry id , Output : Output object)

             

            So in 'SetEntry' , I want to use the output of 'Get Entry'; however I can't see key-value pair.. it's entire 'Output' object without any pair or decoding.

             

            Thanks
            Sanket Mhatre

            • 3. Re: Regarding Workflow Designer : Get Entry Object
              John Gallagher

              Hello Sanket,

               

              You don’t see any key-value pairs because on a phase of a workflow building the actual keys and values are not known yet. There is also “Get Remedy Work Order By Id” action. Tony Chung can you take a look at this please ?

               

              Regards,

              John

              • 4. Re: Regarding Workflow Designer : Get Entry Object
                Sanket Mhatre

                Hi John,

                'Get Remedy work order by id" can't be used , since in above flow only I have 'entry Id' of work order interface form. I am struggling above just to find out, what is the 'work order number' I have created.

                 

                Thanks,

                Sanket

                • 5. Re: Regarding Workflow Designer : Get Entry Object
                  John Gallagher

                  Hello Sanket,

                   

                  Neither the “Get By Id” will be able to find a work order by returned ID from “Create Remedy Work Order” action because the action returns an ID of a “WOI:WorkOrderInterface_Create” form instead of “WOI:WorkOrder”. I spoke to the Engineering team about this and they have logged a defect.which they are currently working on (no ETA yet).

                   

                  Regards,

                  John

                  1 of 1 people found this helpful
                  • 6. Re: Regarding Workflow Designer : Get Entry Object
                    Sanket Mhatre

                    Thanks John,

                     

                    However, it would be nice to know, what 'Get Entry' object supposed to do. If we can't the the extract the data from 'Get Entry' output, then what could be the intended use? Curious to know because there are no documentation/guides, which can elaborate, how to use Service Broker workflow objects.

                     

                    Thanks,

                    Sanket

                    • 7. Re: Regarding Workflow Designer : Get Entry Object
                      Carl Wilson

                      Hi,

                      the Output variable contains all the values from the Get Entry process, however to get out individual values requires that you do a little bit of a workaround in version 3.3.  This is due to the different behaviour between 3.2 and 3.3 where in 3.2 when you added the "Output" to a parameter, this value was expanded allowing you to target specific values in the Output by manipulating the expanded string value.

                       

                      Workaround

                      Steps:

                       

                      • Map the "Output" variable to a parameter and then add the following text after the icon ".WorkOrder_ID".
                      • Save the Workflow (which will error) and copy the text from the error message that is displayed.
                      • Extract the expanded process value (JSON string) from the error message thrown (you may have to do this a few times to capture the text as the error message does not stay around long) e.g. ${activityResults.rx-5ced4b3a-1ba4-4a57-9e2b-ff2627a70014.output}.WorkOrder_ID
                      • In your parameter, remove the original "Output" value and replace it with the above string. Move the ".WorkOrder_ID" value to inside the last bracket (not outside) e.g. ${activityResults.rx-5ced4b3a-1ba4-4a57-9e2b-ff2627a70014.output.WorkOrder_ID}
                      • Save. This will show as an error in the parameter on your process, however you can ignore this error.
                      • Save your workflow
                      • Test

                       

                      The issue is in the 3.3. version, there is no parameter list available for the "Output" item as there is for a Service Broker Context, and the application does not expand out the actual variable to the underlying JSON string as it did in 3.2 (it just displays it as an icon), therefore you cannot get to the JSON string value that you need to manipulate to pull back the required information.

                       

                      You can use this method to pull back any field on the underlying Remedy form that you target with the Get Entry activity.

                       

                      Cheers

                      Carl

                      4 of 4 people found this helpful
                      • 8. Re: Regarding Workflow Designer : Get Entry Object
                        Carl Wilson

                        Hi,

                        further to my workaround to extract values from the Get Entry activity, you will need to extract the "Work Order Entry ID" [Entry ID/Request ID - Remedy Field '1'] for the Work Order to be able to utilise the Set Entry activity as this accepts the Entry ID [Field '1'] of the request for the input.

                         

                        The issue is that this is not populated on the Interface_Create forms for any of the ITSM applications apart from Change Management.  There are corresponding fields available on the forms, but it appears the workflow is not present to populate them OOB.

                         

                        So to utilise these fields you will need to create the Remedy Filter workflow to populate the fields once the underlying application request is successfully created e.g. After the Filter that fires to create the request (the Filters ending with "`!").  You could check on the Change Interface_Create form to see what workflow populates the value and copy for the other ITSM applications.

                         

                        Once you have this value populated you can do the following:

                         

                        Create Work Order - returns "WOI:WorkOrderInterface_Create" Entry ID > Query "WOI:WorkOrderInterface_Create" for the Work Order Entry ID (the one populated by your new Filter) using a Get Entry activity > Update Work Order using a Set Entry activity with the ID you obtained in the previous step.

                         

                        As John Gallagher has mentioned, you can use an Input Map to update the underlying request where the "Key" is the database name(s) for the field(s) you want to update.  You can also cascade Input Maps if you have > 10 values you want to update (or do another Set Fields action).

                         

                        Cheers

                        Carl

                        2 of 2 people found this helpful
                        • 9. Re: Regarding Workflow Designer : Get Entry Object
                          Sanket Mhatre

                          Hi Carl,

                           

                          Thanks for the response.

                           

                          1. Create Work Order, gives me the entry id of Work Order interface form in the output.
                          2. On Work Order interface form , we have a Work order id in the field WorkOrder_ID (1000000182)
                          3. The difficult part for me , was to extract WorkOrder_ID from the get entry output. Let me check with suggested way, In case, I am able to extract the field, I can use it for further operations.

                          Let me check , and close the thread if there are no more questions.

                           

                          Thanks,

                          Sanket

                          • 10. Re: Regarding Workflow Designer : Get Entry Object
                            Louis Op den Brouw

                            Hi guys,

                            thanks for this thread, it was helpful so far so thanks Carl for explaining this part.

                            Now I'm struggling with the next part of the Workflow, the Set Entry. So I've have successfully created the WorkOrder, In the WorkOrderInterface_Create I have set the WorkOrder_ EntryID field and now I want to "Set Entry" some values into the WorkOrders.

                            So what I did is that I

                            * Create Remedy WorkOrder

                            * Get Entry with the Output Map set to WorkOrder_EntryID

                            * Then I have used the "Build Input Set" where I set the  Keys and Values to fill my WO Type Field 02 and WO Type Field 05 fields in the WorkOrder with Values out of my parameters

                            * Then I do the Set Entry and Map the Field Values to Input from the Build Input Set

                            And then I get the following error:Connector: ERROR (106): 106

                             

                            • 11. Re: Regarding Workflow Designer : Get Entry Object
                              Carl Wilson

                              Hi,

                              when testing, I recommend to push the values that you extract or are using to a Notification in SB to ensure that you are seeing what is expected.

                              You can also test the Set Entry using static values first, then extend it to dynamic values.  With the Entry ID for the Work Order, you will need to target the "WOI:WorkOrder" form directly.  The Request ID on the "WOI:WorkOrderInterface" form is a combination value as this is a self join form.

                               

                              Remember to enclose your values in quotes, even if it is a dynamic value when building your workflow.

                               

                              So, try a simple workflow with static values for your Set Entry i.e. Hardcode the Request ID and see what the results are, then when successful move this to your process with dynamic values.

                               

                              Cheers

                              Carl

                              • 12. Re: Regarding Workflow Designer : Get Entry Object
                                Sanket Mhatre

                                Hi Carl,

                                 

                                I tried , but getting error "ERROR (941): The property in the expression could not be resolved to a value"

                                 

                                I tried below steps..

                                 

                                and then  using the WorkOrder_ID for Update WO  object.

                                 

                                Thanks,

                                Sanket Mhatre

                                • 13. Re: Regarding Workflow Designer : Get Entry Object
                                  Carl Wilson

                                  Hi,

                                  try putting "" around the value, or splitting the value out to a local variable and then using that in your Request ID.

                                  Test the value coming back is populated by using a SB Notification to yourself.

                                   

                                  Cheers

                                  Carl

                                  • 14. Re: Regarding Workflow Designer : Get Entry Object
                                    Carl Wilson

                                    Hi,

                                    I will post some screenshots when I get a chance.

                                     

                                    Cheers

                                    Carl

                                    1 2 Previous Next