Skip to main content
Question

Custom action to create normal task

  • January 25, 2023
  • 4 replies
  • 194 views

Forum|alt.badge.img+5
  • Do Gooder (Customer)
  • 11 replies

I am having issues to create “NORMALTASK” based on action and link with parent ticket ?  Although IFS provided the option to create task but it is time consuming as user need to copy all information (Affected User, Task type, summary, description etc ) so I am trying to build a custom Action that will call a custom action script to create a normal task and attached with the parent ticket copying all parent tickets information.

 

In 11.4 version we do have a feature to create task but when I use my legacy script to create normal task passing event_type_enum="NORMALTASK" it gives me error “ERROR 808 Error encountered when creating new event: Exception: ComplexValidationException: A complex validation error has been detected by the application. Rule broken: mandatorySeedEvent, Related field: taskSeedEvent, Message: ??server.validation.errors.mandatorySeedEvent??. Status code: 400”. Legacy scripts works fine in creating incident and service request.

I tried setting the  two variable taskLinkReasonId  and taskSeedEvendID when creating task after reviewing IFS WIKI (https://wiki.axiossystems.com/assyst11-4Wiki/index.php/Integrations:assystREST_More_Examples#Example_1)but it does not work as well.

   

It throws exception “Error encountered when creating new event: Exception: InternalServerProxyException: The requested resource cannot be processed by the underlying application services.”.

 

 

4 replies

Forum|alt.badge.img+12
  • Hero (Customer)
  • 141 replies
  • January 25, 2023

We were working on this task yesterday. I found that I got that and similar errors when my JSON (or possible XML if you are using it) has syntax errors or where the value I was trying to use did not already exist in the system for that event type.
 

We found that this worked for us….

Note: we were passing the $seedId variable in as an integer.

{
    "eventTypeEnum": "NORMALTASK",
        "remarks": "My Task Description",
        "importProfileId": 1,
        "taskLinkReasonId": 1,
        "taskSeedEventId": $seedId,
        "affectedUser": {
            "resolvingParameters": [
                {
                    "parameterName": "shortCode",
                    "parameterValue": "$affectedUser"
                }
            ]
        },
        "itemA": {
            "resolvingParameters": [
                {
                    "parameterName": "shortCode",
                    "parameterValue": "$itemA"
                }
            ]
        },
        "category": {
            "resolvingParameters": [
                {
                    "parameterName": "shortCode",
                    "parameterValue": "$category"
                }
            ]
        },
        "seriousness": {
            "resolvingParameters": [
                {
                    "parameterName": "shortCode",
                    "parameterValue": "$impact"
                }
            ]
        },
        "priority": {
            "resolvingParameters": [
                {
                    "parameterName": "shortCode",
                    "parameterValue": "$urgency"
                }
            ]
        },
        "sla": {
            "resolvingParameters": [
                {
                    "parameterName": "shortCode",
                    "parameterValue": "$sla"
                }
            ]
        }
    }

 


Forum|alt.badge.img+5
  • Author
  • Do Gooder (Customer)
  • 11 replies
  • January 25, 2023

HI Steve:

Thanks for a quick response,  is seedID the parent ticket event ID to which this task will be linked?  I used the lua script to create the task as per below  where the EVENT_ID is the parent ticket id extracted from the custom action

    new_task = {}
    new_task.importProfileId = import_profile_id
    new_task.eventTypeEnum = event_type_enum 
    new_task.itemAId = item_id
    new_task.shortDescription = AV_ITEM_N
    new_task.remarks = ACT_DESC
    new_task.taskLinkReasonId = link_reason_id
    new_task.taskSeedEventId=tonumber(EVENT_ID)
    
 


Forum|alt.badge.img+12
  • Hero (Customer)
  • 141 replies
  • January 25, 2023

Correct, the taskSeedEventId is the parentEventId.

I’m not very good with lua to be honest but it looks right to me. Maybe someone with more experience in the language can take a look.


Forum|alt.badge.img+5
  • Author
  • Do Gooder (Customer)
  • 11 replies
  • January 25, 2023

Thanks Steve, really appreciate your response. It still throws exception “Error encountered when creating new event: Exception: InternalServerProxyException: The requested resource cannot be processed by the underlying application services.”  I will wait and see if anyone from IFS side responds to this thread else will create a support ticket.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings