Running Workflow in Dev Instance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2016 03:48 PM
Hello All,
I'm new to ServiceNow and Im utilizing the Development Instance to get myself started with topics for SN. I was wondering if the Dev Version Instance that SN gives you allows you to set conditions and run workflows?
Ive tried getting a workflow to run and set conditions but when I go to my Workflow Properties (from the context menu) I do not get the option to set any conditions for when my workflow should run. So Im wondering if you can even do this within the Dev Instance?
Any help will be appreciated. Thank you!
ANSWER:
I want to first thank everyone that replied, it was definitely helpful. Thank you all.
I think I need to rephrase/clear up part of my question first:
1. I am not able to set conditions for my workflow as the option to do so is missing from the properties menu. What am I missing?
2. I am not able to test/run the workflow as the Play button is grayed out. Why is this so?
1. Answer: The issue here is that the conditions for a workflow are dependent on the table that you associate it with. As is my understanding, the Requested Item [sc_req_item] table will not display condition settings as it will fire off whenever a new entry to the table is created. Other tables, such as the Request [sc_request] table do allow you to set up conditions for your workflow to run. Just be careful what table you associate your workflow and how that will affect the way it fires off.
2. Answer: "This control is only available for workflows running on the Global table that are accessible from all application scopes." Using the Workflow Editor - ServiceNow Wiki . I didnt quite understand this the first time I read it. I thought the global scope meant the application the workflow was attached to. You can see below there are both an "Application" and "Table" fields.
What you want to focus on is the "Table" field and set that to Global if you want to be able to use the Play button in the Workflow Editor. Otherwise, you can attach it to the table that you want, but to test the workflow youll have to create a new entry in that table.
Bonus:
Once I got this working as I expected, I was having an issue running my script as I was trying to use "window.alert()" or just "alert()" in the script I had within my workflow. I was simply trying to simulate something similar to writing to the console in a dev environment while testing code. This was causing my activity to be skipped (viewing the logs) for some reason. Turns out, you have to consider client side vs server side scripting. As is my understanding the "window.alert()" and "alert()" functions are client side scripting functions, and you should really use "gs.addInfoMessage()" or "gs.print()" to get the desired effect and not have your activity skipped. Further reading: Scripting Alert, Info, and Error Messages - ServiceNow Wiki
Thank you all again!
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-27-2016 03:58 PM
Hi Nestor,
Yes you can configure workflows with out any issues.
You have to checkout the workflow first so that you can modify it. Also make sure you are in the right application scope. Please refer below link for more info.
Workflow Concepts - ServiceNow Wiki

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2016 04:04 AM
Hi Nestor,
Check the menu in the workflow editor. It contains a Properties option. I am not sure from your description if this is where you looked.
From there, a window appears and contains a tab "Conditions" that tells more about when the workflow is set to trigger.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2016 04:13 AM