Jump to content

Steve G

Hornbill Developer
  • Posts

    746
  • Joined

  • Last visited

  • Days Won

    30

Posts posted by Steve G

  1. Hi @Ben Maddams,

    According to the error, your SIS is unable to connect to the job target machine, as that message comes back to the instance from the SIS itself, and your SIS was able to pull the copy of the package from your instance.
     

    Quote

    Remote job creation failed. It was not possible to connect to the remote system.

    This would suggest that the target is maybe switched off or you have a local DNS or network issue in play.

    Cheers,

    Steve

  2. Hi @danec,

    This is a nice easy one :) The question field map should be a stringified JSON object, not a stringified array, as per the docs:

    https://docs.hornbill.com/servicemanager-api-api/entities/servicerequests/espflowcodeentityoperation/content/logServiceRequest#questionfieldmap

     So your example should look like the below, note the removal of the square brackets from your questionFieldMap string:

    {
        "@service": "apps/com.hornbill.servicemanager/Incidents",
        "@method": "logIncident",
        "params": {
          "summary":"Test Ticket",
          "description":"Pls Ignore",
          "customerId":"J Smith",
          "customerType":"0",
          "teamId":"IT_Team",
          "status":"status.open",
          "serviceId":"31",
          "siteId":"59",
          "siteName":"Site A",
          "externalRefNumber":"CS0030050",
          "questionFieldMap": "{\"h_custom_31\": \"c3062b18fbfdc2dcf1cbfb5ebeefdc7c\"}"
    }

    Hope this helps,

    Steve 

  3. Hi @Ben Maddams,

    Apologies for the late response, must've missed this tag.

    I've had a look in the code, and the operation actually supports either a date stamp in the YYYY-MM-DD format, or a full datetime stamp in the YYYY-MM-DD HH:MM:SS format. So no need to concatenate 00:00:00 on to the end :)

    I can see that the docs could (should!) make this clear, so I'll make sure this gets updated for the next ITOM content pack release.

    Cheers,

    Steve

  4. Hi @Kevin Allitt,

    The Hornbill pythonApiLib library does work with Python 3 (I've just tested it to make sure :)), I just needed to install lxml using pip (see below). So you should just need to pull the lxml dependency into your Python 3 installation (looks like you already have it in your Python 2 installation, which it why the Hornbill library works there).

    image.png

     

    Since the Hornbill pythonApiLib library was released, we've promoted to live the ability to send JSON payloads to the Hornbill API instead of the legacy XML payloads, so it might be easier to implement your API calls directly instead of using the legacy library. Means you don't need the lxml library installing too. An example as a starter-for-ten:

    import requests
    import json
    endpoint = "https://your-api-subdomain.hornbill.com/yourinstanceid/xmlmc/apps/com.hornbill.servicemanager/Incidents"
    headers = {   
        "Authorization": "ESP-APIKEY yourHornbillAPIKey"
    }
    payload={
            "@service":"apps/com.hornbill.servicemanager/Incidents",
            "@method":"logIncident",
            "params":{
                "summary":"Your incident Summary",
                "description":"Your incident Description",
                "status":"status.open",
            },
    }
    response = requests.request("POST", endpoint, json=payload, headers=headers)
    print(response.text)

    Hope this helps,

    Steve

  5. @Ben Maddams @Berto2002,

    This was a defect in the Keysafe Key Type definition for Teams Presence which could prevent the refresh of expired access tokens. It's been fixed and should work on your instance now. Depending on your Microsoft refresh token expiration policy, this may just work now for you, or if you get  Refresh Token Expired type error then you'll need to revoke and reconnect your affected key(s).

    We've also added automated tests to prevent defects of this type again in the future.

    Cheers,

    Steve 

  6. Hi @Giuseppe Iannacone,

    The value property of the searchFilter array objects is unbounded, so it needs to be wrapped in an array, as per the example below: 

    {
      "@service": "data",
      "@method": "entityBrowseRecords2",
      "params": {
        "application": "com.hornbill.servicemanager",
        "entity": "Asset",
        "matchScope": "all",
        "searchFilter": [
            {
                "column": "h_class",
                "value": ["computer"],
                "matchType": "exact"
            }
        ]
      }
    }

     I've had a look and this could be made clearer in the API documentation, so I'll make sure that gets updated.

    Cheers,

    Steve

  7. Hi @Everton1878,

    The asset import template functionality supports all the functions available in the Sprig template package, so you could use the trimSuffix, replace, regex etc functions to manipulate your data at template level: https://masterminds.github.io/sprig/strings.html

    An example of using replace could be:

    "h_owned_by": "{{ .userPrincipalName | replace "@yourdomainname.onmicrosoft.com" "" }}",

     This would remove @yourdomainname.onmicrosoft.com from the userPrincipalName being mapped into your target field.

    Hope this helps,

    Steve

    • Like 1
  8. Hi @Berto2002,

    This piece of work was intended to present the utilities in the correct place going forwards, as having them in iBridge (Cloud Automations) doesn't make a great deal of sense - they are utilities that process data locally to your instance, so should be Hornbill Automations rather than Cloud Automations. 

    The operations in iBridge will be marked as deprecated in the next release of the iBridge content pack - this won't break any existing workflows, but will basically remove them from being selected in new Cloud Automation nodes on your workflows. As with all automations that we deprecate, they will not be fully removed from the platform until they are no longer present in any active workflows (or autotasks, runbooks or lifecycles) on customer instances. We appreciate that these automations are in use in many active workflows across most customer instances, and there is no plan to remove them permanently, and as such there is no deadline for migration.

    The operations that are being replaced in this release are:

    • Date Formatter
    • Current Day
    • Get Current Timestamp
    • Get Date Difference
    • Get Next Date
    • Get Timestamp
    • Password Generator

    The documentation for the automations is in-app, and accessible using the blue ? button in your image.

    Hope this helps,

    Steve

    • Like 1
  9. Hi @Ben Maddams,

    As per the docs, the AccountExpires input parameter to the ITOM operation expects a datetime string in the format: YYYY-MM-DD HH:MM:SS. The code in the background does the conversion of that into a PS DateTime Object, for passing in to the AD operation, so you don't have to do any Hornbill-side Int64 conversion: https://docs.hornbill.com/itom-packages/activedirectoryusermanagement/update

    Cheers,

    Steve

     

  10. Hi @Sam P,

    I've been looking at this date issue this morning, and it is working as documented & expected. Check out the output from the ITOM job for a user that I've created via ITOM, note the datetime that has been set: 

    image.png

    Note how the value I've provided is the same as the accountExpires attribute against the user object in Active Directory:

    image.png

    Now, in the Account Expires section of the Account tab, you'll see that the account expires at midnight the previous day:

    image.png

    This is actually a feature of Active Directory (a hangover from legacy NT domains, apparently), and not an issue with the ITOM package. It's definitely odd, but it is documented on the Microsoft website - see the note section from this article as an example:

    image.png

    This article contains a good explanation of what is going on here too: https://www.rlmueller.net/AccountExpires.htm.

    Just a heads-up too, the other enhancements that you asked for are done and are currently in testing, so should be available in the next day or so :)

    Cheers,

    Steve

×
×
  • Create New...