Sync Catalog item variable set in Service Bridge at provider side
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2025 10:52 AM
Hi,
I have implemented service bridge in two of my instances. I have created a catalog item at provider side which have some simple variables and one variable set in which I again have around 15 variables listed.
I have a Remote task definitions created for sc_request and sc_req_item table.
I have a flow triggered at creation or updating of sc_request at provider side only, which in turn looks up respective RITM request.
If the RITM request is found, it creates a remote task for consumer of it, which then syncs to consumer side.
While testing the flow, the flow the failing at step 3 (Null pointer exception) which is create remote task for consumer with below error:
Error: Cannot invoke "Object.getClass()" because "this.val$data[index]" is null
While debugging I found, this error is coming because of variable set added in catalog item. If I remove the variable set or make variables inactive inside it, the flow works fine.
I don't know how do I make the flow validate these variables in variable set, I don't know how to proceed further. Attaching some screenshots for reference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
I tested and found that I can create Requested Item without error with variables and variable sets associated. In my flow for the Requested Item, I used a Trigger of Service Catalog. If you use a trigger of Created or Updated, then Requested Item table is not available for selection. In your flow it appears that you are triggering from the creation of a Request and then looking up the related Requested Items. This could be causing the issue with the variable sets.
I created a flow for each record type Request, Requested Item, and Catalog Task. In my field mappings I create mappings for Catalog Table reference fields. For Requested Item, I create a mapping for Request. For Catalog Task, I create mappings for Requested Item and Request. Because Service Bridge maintains SysIds of parent records between instances when synced to the consumer instance the reference fields will have the correct SysIds and align Request, Requested Item, and Catalog Task.
Try this and let me know if it works for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi Kenny,
Thanks for the solution and I tried this, but I am getting the below error while creating the remote task for RITM. Am I missing anything? The RITM is already mapped to the respective REQ.
Note: I have not put any variable mapping in RTD for this.
Error: Method returned an object of type which is not allowed in scope sn_sb_pro
Posting the flow which I created:
Logs:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Hi Suraj,
Looking back through the thread I think I understand where you were originally going with this. So I am going back to creating this from a Request.
- You are trying to create this Flow independent of the Flow associated with the Catalog Item. This Flow is not referenced in the Catalog Item.
- You are only concerned with creating the Requested Item in the Consumer and not the Request.
- For the action "Create remote task for Consumer" to work, company has to be filled in on the Requested Item.
- I am testing with a Demo Catalog Item which has a variable set - VM Provisioning.
Here is what I have tested and is working:
1. Trigger: I added Request State Approved to make sure all Request Items and Variables have been created before triggering the Flow.
2. Look Up Requested Item Record
3. Update Requested Item Record Company to the Account on the SB Consumer Connection
4. Create remote task for Consumer
5. Execution Completed
Hopefully this help! 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a week ago
Thanks Kenny for this!
I tried the same steps mentioned by you, but I am getting the same below error.
Error: Cannot invoke "Object.getClass()" because "this.val$data[index]" is null
I am sure that you might be using a single-row variable set for your case, but can you try with creating a multi row variable set and put a demo single line Text variable inside it (shown below) and then try? Sorry should have provided this info earlier only but I am also new to this, so didn't think of it.
Let me know If it again worked for you or if not, what solution you find.
Thanks!