The CreatorCon Call for Content is officially open! Get started here.

Active workflow - colors on activities

palmen
Tera Guru

When looking at an active context for a workflow, what does the brown color indicate on an activity?

We have a problem with one of our scripts in a workflow that has stoped working and it's marked with this brown color, does this mean the script isn't running at all?

Everything was working in the workflow until Eureka release from what I can see. The day after Eureka release the script has never been executed from the workflow.

find_real_file.png

1 ACCEPTED SOLUTION

Connect the end point of set value activity directly to the run script. Don't have two paths from set value activity.

View solution in original post

10 REPLIES 10

Kalaiarasan Pus
Giga Sage

Brown - Cancelled


Blue - executed


Green - running


Red - error


Thanks for the input kalai


Any idea why the Run Script is cancelled?



var licenseTicketNeeded = false;


//Get the requested app


var app = new GlideRecord('cmdb_ci_service');


if (app.get(current.cmdb_ci.sys_id)) {


  licenseTicketNeeded = app.u_license_ticket;


}




//Create ticket


if (licenseTicketNeeded) {


  var ticket = new GlideRecord('ticket');


  ticket.initialize();


  ticket.u_ticket_type = '3'; //SRQ


  ticket.u_reported_by = '8d972c1be0b3d000d562365733965855'; //ServiceNow (autocreated)


  ticket.u_task_for = current.request.requested_for;


  //Set correct cmdb attribute on the ticket


  if (app.sys_class_name == 'u_cmdb_ci_service_app') {


          ticket.u_application = app.sys_id;


  }


  else if (app.sys_class_name == 'u_cmdb_ci_service_system') {


          ticket.u_system = app.sys_id;


  }


  else {


          ticket.cmdb_ci = app.sys_id;


  }


  ticket.short_description = 'Ny användare har givits tillgÃ¥ng till applikation: ' + app.getDisplayValue();


  ticket.assignment_group = app.u_assignment_group_license;


  ticket.assigned_to = app.u_assigned_to_license_ticket;


  var msg = "Ticket is created from " + current.number;


  ticket.work_notes.setJournalEntry(msg);


  ticket.contact_type = 'self-service';


  ticket.u_axf_category = 'Mjukvara';


  //Save the ticket


  var ticketSysID = ticket.insert();


  if (ticketSysID) {


          current.work_notes.setJournalEntry(gs.getMessage('License ticket created for this request item ') + ticket.number);


          current.update();


  }


}


else {


  current.work_notes.setJournalEntry(gs.getMessage('No license ticket needed for this system/application.'));


  current.update();


}



The only thing that is changed in the script when going to Eureka is line 30. It has been changed to the following (no idea why it's changed). Can this be the reason for the script to be cancelled?


ticket.work_notes = msg;


I don't see the activity's end point connected anywhere. Can you first connect the end point and try and see if that works?


It doens't help, we've got several activitys where the end point isn't connected in other workflows.


When I connected it to "End" I still get the same result


find_real_file.png