Extending sc_req_item, how do I map the catalog?

tahnalos
Kilo Sage

We have a bunch of Catalog Items in the Service Catalog that are going to be sent to a wide variety of integrations.

Normally, I would have been ok with just using variables, but the issue here is that these integrations are not able to read anything within the sc_item_option and sc_item_option_mtom tables.   A repository table would have been an option, but given that these items ask different questions, the repository would have to have a lot of columns.

A suggestion was made to extend the sc_req_item table to include the data for each of these integrations so that it can still use the data from the Request Items table itself, which is great and everything, however, I am unable to set up the catalog item to map to the extended table.   Anyone have any idea on how I might do this?   Using variables would be one option, but I would prefer to stay away from accessing variables if at all possible as it means that if the columns in the extended table change, the code that uses the variables has to be reset.

Ideas anyone?

19 REPLIES 19

Hi Tahnalos,



I've tested this with workflows successfully... There is a BR on [sc_req_item] called "Start Workflow" that does exactly what it says.   However, it has the following condition:



        !current.cat_item.workflow.nil() && current.stage=='request_approved' && current.context.nil()




So if the parent request (to your custom RITM) is not yet approved, the workflow for your custom RITM will be created but not yet started.   This was what I found in my test case, that setting approval on the REQ cascades down to the RITM and leads to the workflow being started.   You could also just set approval on the custom RITM itself.




Thanks,


-Brian


No, that isn't it.   In our setup, the requests are set to be approved automatically.



(Don't ask me why it was set up that way).


Ok, let's break it down then... if there is a workflow context for the custom item stuck at the Begin activity, then that means:



  1. your wf context is getting created and associated to your custom task ok, but it is not being started for some reason.
  2. you need to check for these causes... I would start with your custom RITM's approval...
    (i.e., the REQ is getting approved automatically, but is your approval cascading down to your custom item?)
    --try adding the approval field to your custom item's form and check the approval status, manually approve it if needed, and see if the workflow moves forward.
  3. If the approval checks out ok, then look to the BR ("Start Workflow") that is supposed to be starting the workflow on [sc_req_item].
    --I would suggest (in dev) setting it to be inactive, and then use "Insert and Stay" to create a copy of it that you can customize for testing.   Try removing the conditions from this BR one-by-one and see if that makes any difference in your custom item workflow getting started.   If it works without a (or all) condition, then this is where you need to look for the cause.



Thanks,


-Brian


1) This is likely what is happening.
2) Brought the Approval field into view.   Reads Requested.   But there is no approval record created.


3) The business rules check out.   The Cat item has a workflow attached, stage = request_approved, and context field is blank.


In (2), manually change it to "Approved" and see what happens.




-Brian