- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2015 02:17 PM
Hello all:
I haven't quite wrapped my head around workflows, but is it possible to run a workflow when a record is updated? Keep in mind for this, I cannot use an order guide because the REQ (sc_request) record needs to be created from an e-mail inbound action. From there I have been able to auto create a RITM that is attached to it for a manager to fill out important onboarding data. This is an on-boarding process. Ultimately what I would like to accomplish happens in these steps:
1) regular user completes some fields on the "FIT" RITM they have. Data must be entered into the "Type of PC" field in order to generate a RITM for the SN_Service Desk group, and data must be entered in the Office/Cubicle field in order to generate a RITM for the SN_Facilities group.
2) If these fields are filled out and the person clicks the "Update" button, I would like it to automatically close this RITM, and then generate the RITMs for the two assignment groups listed above
3) The two RITMs would also be attached to the original REQ record in order to track it.
I have written a workflow that is set on the sc_req_item table:
The purpose of this workflow is to run when a RITM hits the "Closed Complete" stage and has the Item (cat_item) value of "FIT," I'd like two additional RITMs to be created - one for the Service Desk assignment group, and another for the Facilities group. Here is a look at the workflow:
The "Create Task" steps are set as such:
The "Create Facilities RITM" is set similarly, but with the Fulfillment group being "SN_Facilities"
It doesn't seem to work as I want it to, since the RITMs are never created.
Is this all possible from the workflow? What should I add or where should I add this in order to accomplish this? Any help on this would be awesome! Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2015 04:11 PM
Ken,
Try to Do something like:
1) Have a Business rule on 'sc_req_item' which will run when any of the two fields change and have the script as:
// pass the sys_id of the record in 'wf_workflow' table, not the wf_workflow_version table.
startWorkflow('<<sys_id>> of the Workflow');
function startWorkflow(id) {
var w = new Workflow();
var context = w.startFlow(id, current, current.operation(), getVars());
}
function getVars() {
var vars = {};
for (var n in current.variables)
vars[n] = current.variables[n];
return vars;
}
2) Now in you 'Create Task' activity in the Advance Section, have something like this also:
task.request = current.request.sys_id;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2015 04:11 PM
Ken,
Try to Do something like:
1) Have a Business rule on 'sc_req_item' which will run when any of the two fields change and have the script as:
// pass the sys_id of the record in 'wf_workflow' table, not the wf_workflow_version table.
startWorkflow('<<sys_id>> of the Workflow');
function startWorkflow(id) {
var w = new Workflow();
var context = w.startFlow(id, current, current.operation(), getVars());
}
function getVars() {
var vars = {};
for (var n in current.variables)
vars[n] = current.variables[n];
return vars;
}
2) Now in you 'Create Task' activity in the Advance Section, have something like this also:
task.request = current.request.sys_id;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2015 04:31 PM
Thanks Mani. I will give this a shot and see how it goes. But the more I have been thinking, I am wondering if I should just create a separate table that has read/write access for everybody and make the form as I need it, and when they update, I can have it fire off a workflow to create the RITMs I need. This way it takes the other workflow factors out of the problem and I can control it better.
I find the security thing very confusing in SN. Can someone tell me the quickest, easiest way to give read/write access to a table so that a regular user with no roles would be able to edit a record in this new table?
Thanks all for the suggestions and help. And thanks for your patience.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2015 07:17 PM
That kind of goes against what an unlicensed user is. If they're making updates on a custom table, they will/should be consuming licenses.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2015 08:22 PM
Many thanks again for answering my questions. My intention isn't to circumvent licensing, but I think that if a user without a role can create a request, through the service catalog or whatever, then I don't understand why it has to be on the sc_request/sc_req_item tables exclusively. The system allows you to create custom tables, but not be able to use them? I only desire it to keep these requests separate, since apparently SN doesn't allow for a very clean (tabbed) view of the catalog item variables on RITMs - you get one catalog item and hence one set of variables and when you might have a lot, with a lot of different sections, it gets messy on the regular form layout - when that form layout needs to be used by a bunch of different tasks.
I was just looking for a way to automate a process similar to the order guide. But instead of the user creating it from scratch, the REQ or parent record would already be there, and they get a RITM to fill in all the essential onboarding info.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2015 09:30 PM
You could use Record Producers to create any kind of ticket you like from the Service Catalogue. Catalogue Items create Requests and Requested Items. Record Producers look like a Catalogue Items, but you can target any table you like.
You could create a custom application and extend the Task table with a new request type. Create a Record Producer to allow unlicensed users to create a ticket of this new type. Then on your new form, you can modify it any way you like. Set the ACL's to allow users with the new application's role to read and update any of the new tickets. This will only cost you a CreateNow licence per user. And only allow unlicensed users to read and update tickets that are directly related to them (like all Tasks).
Repeat for all the request types you like. Combine them in the same application, or separate them as needed.
