Automic Workload Automation

 View Only
  • 1.  Automatic Job Creation

    Posted Sep 27, 2021 06:08 AM
    Hello to everyone,

    I wanted to get your opinion on a subject.

    Can we make automatic job definition?
    Is it possible for us to define a job (or any object) on AE, perhaps via the service desk, according to the incoming requests?

    I did not see such a feature in Automic API competencies, but maybe I missed it.

    Thanks in advance.

    ------------------------------
    Emre B.
    ------------------------------


  • 2.  RE: Automatic Job Creation

    Posted Sep 27, 2021 07:54 AM
    Hi Emre,

    you can create objects by using an XML definition file (create a template and fill variable parts provided by the request form). Alternatively you can use the  Java API (https://docs.automic.com/documentation/webhelp/english/AA/12.3/AE/12.3/API/index.html) in order to create objects.

    regards,
    Peter


  • 3.  RE: Automatic Job Creation

    Posted Sep 28, 2021 07:56 AM

    Hi Emre,

    you can indeed use the API to create new jobs inside Automic client.
    This can be done passing a JSON job definition to the API.

    In the following example I create a new job in Automic Client 100 using linux curl command  (Automic 12.2) : 



    curl --header "Content-Type: application/json" --request POST login:password@server:8088/ae/api/v1/100/objects -d \
    '{
    "path": "TEST/FOLDER",
    "data" : {
    "jobs" : {
    "metadata" : {
    "version" : "12.2.6"
    },
    "general_attributes" : {
    "name" : "JOB_CREATED_AUTO",
    "type" : "JOBS",
    "inherit_output_filter" : "N",
    "queue" : "QUEUE_NAME",
    "description" : "Description",
    [...]
    "versioning_id" : " "
    },
    "scripts" : [ {
    "process" : "R3_ACTIVATE_REPORT REPORT=\"TEST\",VARIANT=\"TEST\",WAIT=\"YES\""
    }, {
    "pre_process" : "!Row1"
    }, {
    "post_process" : [ "!Row1", "!Row2", "!Row3" ]
    } ],
    "job_attributes" : {
    "activation_at_runtime" : "1",
    "platform" : "R3",
    "agent" : "AGENT_NAME",
    "login" : "LOGIN.OBJECT",
    [...]
    },
    "rollback_definitions" : { }
    }
    }
    }'