Workflow and ServiceDesk Community

 View Only

Webservice - Reassign Incident ServiceDesk 7.1

  • 1.  Webservice - Reassign Incident ServiceDesk 7.1

    Posted Mar 05, 2014 05:01 AM

    Hello,

    I didn't manage to find anywhere this kind of workflow so i've decided to share :)

    ..so i've developed a Webservice for request reassingment and this is the result:

    ReassignWS.PNG

     

    Workflow Type: WebService

    As an input data i'm taking:

    # ReportID (tracking_id) - string,

    # Assignment (user email or group name) - string,

    # ReassignedByEmail - (reassiging user email)

    Build hmtl table and send email components are used only for my debugging needs :)

     

    1. Declared new variable - Assignee - (Data Type: AssignmentTarget) - keeps information about Assignment Target - DisplayName, Email, UserID or Group Name, GroupID

    2. Get Incident By Tracking ID - ReportID as input - Output - Incident data

    3. Text Rule - checks if Assignment variable contains '@' character  -- this determines the path for next steps of workflow -- if contains - upper path else lower path

    4. Declared new constant - Assignee.AssignmentType - (Data Type: AssignmentType:User/Group)

    5. Get User By Email or Get Group By Name depending on path - in result - User or Group details

    6. Build Assignement Target - SingleValueMapping - mapping chosen AssignmentTarget details  to Assignee variable

    ReassignWS2.PNG

    a) upper path (assign to USER) :

    ReassignWS2a.PNG


    b) lower path (assignt to GROUP):

    ReassignWS2b.PNG

    7. Building new Collection - NewAssignments (data type: AssignmentTarget) from Asignee items:

    ReassignWS3.PNG

     

    // for both paths component has the same values

    8. Creating new NewEscalationMessage (you can call it what ever you want, it's just important that it's ToIncidentEscalateMessage data type) variable using SingleValueMapping from gathered values.

    This has to be created for needs of next component - Reassing Request - SendCompleteWorkflowMessage component.

    This components send information about Reassingment target to SD.IncidentManagementWorkflow.

    SD.IncidentManagementWorkflow grabs this information (checks every 5 minutes for ToIncidentEscalateMessage data ) and reassingns incidents. I'dont know why every 5 minutes and where to change it...just my observations :)

    ReassignWS4.PNG

     

    9. Mentioned Reassing Request - SendCompleteWorkflowMessage component - send message about Reassignment Target to SD.IncidentManagementWorkflow

    # uses [Incident.TaskID] from Get Incident By Tracking ID component
     

    ReassignWS5.PNG

    10. SD. IncidentManagement:

    Model: Initial Diagnosis -> Component Initial Diagnosis --> Message Listener Tab:

    This is where are the listerens defined for given data type:

    ReassignWS6.PNG

    For Reassinging the first action from the top is responsible (Edit):

    ReassignWS6a.PNG

    Path Name determines the name of action(path) visible in the Initial Diagnosis Component.

    Grabbed data is being processed using this path:

    ReassignWS6c.PNG

     

    ReassignWS6b.PNG

    Path Data - thats the data send by the WebService that includes the Reassignment Targed details