Skip to main content

Posts

Showing posts from 2018

Flow Designer

The  Flow Designer support for the Service Catalog  plugin (com.glideapp.servicecatalog.flow_designer) adds the Service Catalog trigger to Flow Designer. The Flow Designer support for the Service Catalog does not require a separate subscription. To activate the plugin on your company instance, request activation through the HI Customer Service instance.

Notifications

Notifications send outbound email to one or more recipients in response to specific activities in ServiceNow. Notifications can be sent when: Records are inserted or updated Events are generated The Notification activity executes in a workflow  Administrators can use the Application Navigator in the main ServiceNow browser window to open  User Administration > Users  to see a list of user records. Email : User's email address Calendar integration : Set to either --None-- or Outlook. When set to Outlook, users can receive calendar appointment notifications. DEVELOPER TIP : To force a notification to be sent even if recipients have unsubscribed, developers can modify the Notification form layout to include the Force delivery field. When selected, notifications are sent regardless of user notification preference settings. DEVELOPER TIP : ServiceNow sends notifications to all recipients in the Who will receive section even if those users are not authorize...

Workflow

Workflows can have three states: Checked out : executes only for the user who has the workflow checked out Published : executes for all users and records meeting the workflow conditions Unpublished : no longer available for new contexts but may still be running for older contexts Only one published version of a workflow exists in runtime for new contexts. When a workflow is invoked, the current workflow definition is loaded into the workflow context.

Workflow Editor

Checking Out a Workflow To prevent developers from making changes to a workflow that will impact other users, workflows need to be checked out before they can be edited. When a workflow is checked out, changes are applied to the workflow only for the user who checked it out. When development is complete, workflows must be published to be active in the environment. Every workflow activity has a different set of configuration fields. The configuration fields are dependent upon what an activity does. For example, the Approval - User activity needs to know the approver(s). Validating Workflows Workflow validation is the first step to ensure a workflow is error-free. Validation cannot test whether a workflow works as expected. Validation prevents workflows with critical flaws from executing and resulting in an unstable or incomplete state. Validation checks for issues like: Activities with missing transitions Multiple or missing End activity Invalid table references ...

What is a Workflow?

A workflow is a sequence of activities to automate processes in applications.  Activities are workflow blocks that perform different tasks, such as obtaining approvals, sending email, running scripts, testing conditions, and setting field values on records. Workflow are launched a number of different ways including: Triggered by field values on a record UI Action Server-side scripts When to Use Workflows Use workflows to automate multi-step processes such as: Approvals SLAs Task creation Event generation Email notifications For example, if an email needs to be sent when a new record is inserted into the database, that is a discrete action which does not require workflow. If the email is sent when a request is approved or rejected, this is a multi-step process which can be automated with workflow.

Events

There are two ways to generate events: Server-side script using the gs.eventQueue() method Workflow Create Event activity gs.eventQueue() Method The eventQueue() method is part of the GlideSystem server-side API. The eventQueue() method inserts an event in an event queue. The eventQueue() method is typically passed four parameters but can also take an optional 5th parameter: Event name. Enclose the event name in quotes. GlideRecord object, typically current but can be any GlideRecord object from the event's table. Any value that resolves to a string. This is known as parm1 (Parameter 1). Can be a string, variable that resolves to a string, or method that resolves to a string. Any value that resolves to a string. This is known as parm2 (Parameter 2). Can be a string, variable that resolves to a string, or method that resolves to a string. (Optional) Name of the queue to manage the event. DEVELOPER TIP : Use gs.getUserName() and gs.getUserID() for parm1 and p...

GlideSystem hoursAgo() method

When passed a positive number, the method looks into the past. When passed a negative number, the method looks into the future. It may seem counterintuitive for a negative number to reference the future. The method is hoursAgo(), which is why positive numbers are in the past. Two hours ago is a positive number.

Scheduled Jobs

To run a Scheduled Script Execution on the last day of the month, configure a monthly Scheduled Script Execution set to run on day 31. The Scheduled Script Execution will run on the last day of the month, even for months with fewer than 31 days. On Demand Scheduled Script Executions run when an administrator clicks the Execute Now button. Scheduled Script Executions have two scripting fields: Condition Run this script

Data Sources

Data sources define what data should be imported. Only admin users can create data sources. In this module, the data source is a Microsoft Excel spreadsheet. Other possible data sources are: CSV JDBC FTP HTTP XML Data is not imported directly from a Data Source into the target table. The steps are: Load Data into a staging table Create Transform Map Run Transform to move data from the staging table to the target table Check data integrity While transforming, 1)  Do not use the string NULL in source data or in a script. NULL is a reserved word. Null and null can be used but not NULL. 2)  Field Maps take precedence over Transform Map scripts. 3)  Use the coalesce option in a Transform Map Field Map to determine if a row in the source data matches a record in the target table. The coalesce option makes a field a record's unique key. Set the coalesce value to true to use a field to check for collisions. Transformation Script: Transform...

SNOW Data Import Prerequisites

Before importing data into ServiceNow, it is recommended you take the time to: Understand what data you are bringing in Create a plan to map the source file columns to the target table columns Decide what to do with incomplete or erroneous data It is much harder to remove unwanted data than it is to create a plan in advance.

SNOW Cross-scope access Applications

Use Runtime Access Tracking to manage script access to resources from other applications. This is known as cross-scope access because the records are in different application scopes. None : No authorization required for application scripts to access resources from other applications as long as the other application allows it. No record in the cross-scope access table. Tracking : Allows application scripts to access resources from other applications. A record for the access is automatically inserted in the cross-scope access table with a Status value of Allowed. This is the default setting. Enforcing : Allows application scripts to access resources from other applications only after an admin authorizes the access. A record is automatically added to the cross-scope access table with a Status value of Requested. The cross-scope privileges must be set before applications are installed on other instances. While applications are under development, be sure to test all script logic t...