Create a Condition Event

You can use REST API to create a condition event. Condition events enumerate possible occurrences or activities related to an asset. For example, condition events might define an asset's modes of failure (failure codes), mechanisms or root causes of failure (cause codes), list the repair activities that can be performed on the asset (resolution codes), describe different anomalous behaviors an asset might exhibit (diagnostic codes), and so on.

Condition events created in Oracle Fusion Cloud Maintenance are automatically synchronized with the Oracle Fusion Cloud IoT Asset Monitoring Service. The condition events can be used by the IoT Asset Monitoring Service to automatically create maintenance work orders for specific types of IoT incidents. If the condition event code linked to an IoT incident matches the condition event code on a maintenance program, a work order is generated using the information in the maintenance program.

Here's a typical application processing flow for creating different types of condition events:

  1. You create a failure code condition event.
  2. You create a cause code condition event.
  3. You create a resolution code condition event.
  4. You create a diagnostic code condition event.
  5. You may choose to update an existing condition event.
  6. You may choose to disable an existing condition event.

Create a Failure Code Condition Event

In this scenario, you create a failure code condition event. This is indicated by passing the value FAILURE for the attribute ConditionEventTypeCode.

Example URL

Use this resource URL format.

POST

curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/latest/assetConditionEventCodes"

Example Request

This table shows the typical attributes to create a condition event:

Table -

Value Description
ConditionEventCode Abbreviation that uniquely identifies a condition event.

The condition event code is mandatory for a condition event.

ConditionEventName Name of the condition event. The condition event name must be unique to a ConditionEventCode and ConditionEventTypeCode.
ConditionEventDescription Free-text description of a condition event. This attribute is optional.
ConditionEventTypeCode Abbreviation that uniquely identifies the functional use of a condition event. The values currently defined are:
  • FAILURE
  • CAUSE
  • RESOLUTION
  • DIAGNOSTIC
ConditionEventCategoryCode Abbreviation that uniquely identifies business-defined categories for condition events. This attribute is optional, but if used must be a valid value in lookup ORA_MNT_EVENTCODE_CATEGORY.
Here's an example of the request body in JSON format.
{
    "ConditionEventCode": "FC001",
    "ConditionEventName": "Failure Code 001",
    "ConditionEventDescription": "Failure Code 001",
    "ConditionEventTypeCode": "FAILURE"
}

Example Response

Here's an example of the response body in JSON format.
{
    "ConditionEventCodeId": 300100556562569,
    "ConditionEventCode": "FC001",
    "ConditionEventName": "Failure Code 001",
    "ConditionEventDescription": "Failure Code 001",
    "ConditionEventTypeCode": "FAILURE",
    "ConditionEventTypeName": "Failure code",
    "ConditionEventCategoryCode": null,
    "ConditionEventCategoryName": null,
    "SourceReferenceId": null,
    "ActiveEndDate": null,
    "ConditionEventCodeDisableFlag": null,
    "CreatedBy": "MNT_QA",
    "CreationDate": "2022-01-18T13:46:43+00:00",
    "LastUpdateDate": "2022-01-18T13:46:43.114+00:00",
    "LastUpdateLogin": "D5C5D325BBD230C5E053D45AF00AC909",
    "LastUpdatedBy": "MNT_QA",
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/assetConditionEventCodes/300100556562569",
            "name": "assetConditionEventCodes",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/assetConditionEventCodes/300100556562569",
            "name": "assetConditionEventCodes",
            "kind": "item"
        }
    ]
}

Create a Cause Code Condition Event

In this scenario, you create a cause code condition event. This is indicated by passing the value CAUSE for the attribute ConditionEventTypeCode. Note that cause codes are used for both the apparent cause of failure (that is, what the technician sees; for example, a voltage spike) and the root cause of failure (the first step in the causal chain; for example, faulty design or improper user training).

Example URL

Use this resource URL format.

POST
curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/latest/assetConditionEventCodes"

Example Request

Here's an example of the request body in JSON format.
{
    "ConditionEventCode": "CC002",
    "ConditionEventName": "Cause Code 002",
    "ConditionEventDescription": "Cause Code 002",
    "ConditionEventTypeCode": "CAUSE"
}

Example Response

Here's an example of the response body in JSON format.
{
    "ConditionEventCodeId": 300100556909113,
    "ConditionEventCode": "CC002",
    "ConditionEventName": "Cause Code 002",
    "ConditionEventDescription": "Cause Code 002",
    "ConditionEventTypeCode": "CAUSE",
    "ConditionEventTypeName": "Cause code",
    "ConditionEventCategoryCode": null,
    "ConditionEventCategoryName": null,
    "SourceReferenceId": null,
    "ActiveEndDate": null,
    "ConditionEventCodeDisableFlag": null,
    "CreatedBy": "MNT_QA",
    "CreationDate": "2022-01-19T11:44:25+00:00",
    "LastUpdateDate": "2022-01-19T11:44:25.028+00:00",
    "LastUpdateLogin": "D5C5D325E1BB30C5E053D45AF00AC909",
    "LastUpdatedBy": "MNT_QA",
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/11.13.18.05/assetConditionEventCodes/300100556909113",
            "name": "assetConditionEventCodes",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/assetConditionEventCodes/300100556909113",
            "name": "assetConditionEventCodes",
            "kind": "item"
        }
    ]
}

Create a Resolution Code Condition Event

In this scenario, you create a resolution code condition event. This is indicated by passing the value RESOLUTION for the attribute ConditionEventTypeCode. Note that a resolution code is not intended to be as specific as a work definition or standard operation. Rather, it captures a more generic category of maintenance activity such as Repair, Replace, Modify, Adjust, and so on. See ISO14224 for a standardized taxonomy of maintenance activities.

Example URL

Use this resource URL format.

POST
curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/latest/assetConditionEventCodes"

Example Request

Here's an example of the request body in JSON format.

{
    "ConditionEventCode": "RC001",
    "ConditionEventName": "Resolution Code 001",
    "ConditionEventDescription": "Resolution Code 001",
    "ConditionEventTypeCode": "RESOLUTION"
}

Example Response

Here's an example of the response body in JSON format.
{
    "ConditionEventCodeId": 300100556909277,
    "ConditionEventCode": "RC001",
    "ConditionEventName": "Resolution Code 001",
    "ConditionEventDescription": "Resolution Code 001",
    "ConditionEventTypeCode": "RESOLUTION",
    "ConditionEventTypeName": "Resolution code",
    "ConditionEventCategoryCode": null,
    "ConditionEventCategoryName": null,
    "SourceReferenceId": null,
    "ActiveEndDate": null,
    "ConditionEventCodeDisableFlag": null,
    "CreatedBy": "MNT_QA",
    "CreationDate": "2022-01-19T11:45:22+00:00",
    "LastUpdateDate": "2022-01-19T11:45:22.023+00:00",
    "LastUpdateLogin": "D5C611157AA930C1E053D45AF00AA06B",
    "LastUpdatedBy": "MNT_QA",
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/assetConditionEventCodes/300100556909277",
            "name": "assetConditionEventCodes",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/assetConditionEventCodes/300100556909277",
            "name": "assetConditionEventCodes",
            "kind": "item"
        }
    ]
}

Create a Diagnostic Code Condition Event

In this scenario, you create a diagnostic code condition event. This is indicated by passing the value DIAGNOSTIC for the attribute ConditionEventTypeCode. Diagnostic codes are the primary attribute for Asset Diagnostic Symptoms, and are the most common ConditionEventTypeCode passed from Oracle Fusion Cloud IoT Asset Monitoring Service when an IoT incident occurs.

Example URL

Use this resource URL format.

POST
curl -u username:password -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/latest/assetConditionEventCodes"

Example Request

Here's an example of the request body in JSON format.

{
    "ConditionEventCode": "DC001",
    "ConditionEventName": "Diagnostic Code 001",
    "ConditionEventDescription": "Diagnostic Code 001",
    "ConditionEventTypeCode": "DIAGNOSTIC"
}

Example Response

Here's an example of the response body in JSON format.
{
    "ConditionEventCodeId": 300100556911430,
    "ConditionEventCode": "DC001",
    "ConditionEventName": "Diagnostic Code 001",
    "ConditionEventDescription": "Diagnostic Code 001",
    "ConditionEventTypeCode": "DIAGNOSTIC",
    "ConditionEventTypeName": "Diagnostic code",
    "ConditionEventCategoryCode": null,
    "ConditionEventCategoryName": null,
    "SourceReferenceId": null,
    "ActiveEndDate": null,
    "ConditionEventCodeDisableFlag": null,
    "CreatedBy": "MNT_QA",
    "CreationDate": "2022-01-19T11:46:15+00:00",
    "LastUpdateDate": "2022-01-19T11:46:15.019+00:00",
    "LastUpdateLogin": "D5C58B3284B8307DE053D45AF00AF4E1",
    "LastUpdatedBy": "MNT_QA",
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/assetConditionEventCodes/300100556911430",
            "name": "assetConditionEventCodes",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000178"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/assetConditionEventCodes/300100556911430",
            "name": "assetConditionEventCodes",
            "kind": "item"
        }
    ]
}

Update a Condition Event

In this scenario, you may update a condition event. The values that can be updated are ConditionEventName, ConditionEventDescription, ConditionEventCategoryCode, and SourceReferenceId. ConditionEventCode, ConditionEventTypeCode, and ActiveEndDate can't be updated. Note that ActiveEndDate is only updated by passing Y to the ConditionEventCodeDisableFlag.

Example URL

Use this resource URL format.

PATCH
curl -u username:password -X PATCH -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/latest/assetConditionEventCodes/ConditionEventCodeId"

Example Request

This table shows the typical attributes to update a condition event.

Table -

Value Description
ConditionEventName Name of the condition event. The condition event name must be unique to a ConditionEventCode and ConditionEventTypeCode.
ConditionEventDescription Free-text description of a condition event. This attribute is optional.
ConditionEventCategoryCode Abbreviation that uniquely identifies business-defined categories for condition events. This attribute is optional, but if used must be a valid value in lookup ORA_MNT_EVENTCODE_CATEGORY.
SourceReferenceId A free-text value for tracking the unique identifier for a condition event in an external system. For example, this attribute can track the unique identifier for this condition event in Oracle Fusion Cloud IoT Asset Monitoring Service after the condition event is created in Oracle Fusion Cloud Maintenance and synchronized with IoT Asset Monitoring Service. This attribute is optional.
ConditionEventCodeDisableFlag Boolean value that indicates whether or not to disable a condition event. The attribute value is either Y or N. When no value is passed, the default value is N. Passing Y updates ActiveEndDate to the current system date.

Here's an example of the request body in JSON format.

{
    "ConditionEventName": "FC001 - Updated",
    "ConditionEventDescription": "FC001 - Updated",
    "ConditionEventCategoryCode": "MECH",
    "SourceReferenceId": "SourceRefID-1001"
}

Example Response

Here's an example of the response body in JSON format.
{
    "ConditionEventCodeId": 300100556562569,
    "ConditionEventCode": "FC001",
    "ConditionEventName": "FC001 - Updated",
    "ConditionEventDescription": "FC001 - Updated",
    "ConditionEventTypeCode": "FAILURE",
    "ConditionEventTypeName": "Failure code",
    "ConditionEventCategoryCode": "MECH",
    "ConditionEventCategoryName": "Mechanical Failure",
    "SourceReferenceId": "SourceRefID-1001",
    "ActiveEndDate": null,
    "ConditionEventCodeDisableFlag": null,
    "CreatedBy": "MNT_QA",
    "CreationDate": "2022-01-18T13:46:43+00:00",
    "LastUpdateDate": "2022-01-19T11:55:41+00:00",
    "LastUpdateLogin": "D5C58CB1248630ADE053D45AF00A3CF9",
    "LastUpdatedBy": "MNT_QA",
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/assetConditionEventCodes/300100556562569",
            "name": "assetConditionEventCodes",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000278"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/assetConditionEventCodes/300100556562569",
            "name": "assetConditionEventCodes",
            "kind": "item"
        }
    ]
}

Disable a Condition Event

In this scenario, you may disable a condition event. This is done by calling PATCH and passing Y to ConditionEventCodeDisableFlag. This updates ActiveEndDate to the current system date.

Example URL

Use this resource URL format.

PATCH
curl -u username:password -X PATCH -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d 'request payload' "https://servername/fscmRestApi/resources/latest/assetConditionEventCodes/ConditionEventCodeId"

Example Request

Here's an example of the request body in JSON format.

{
    "ConditionEventCodeDisableFlag":"Y"
}

Example Response

Here's an example of the response body in JSON format.
{
    "ConditionEventCodeId": 300100556562569,
    "ConditionEventCode": "FC001",
    "ConditionEventName": "FC001 - Updated",
    "ConditionEventDescription": "FC001 - Updated",
    "ConditionEventTypeCode": "FAILURE",
    "ConditionEventTypeName": "Failure code",
    "ConditionEventCategoryCode": null,
    "ConditionEventCategoryName": null,
    "SourceReferenceId": "SourceRefID-1001",
    "ActiveEndDate": "2022-01-19T11:58:42.540+00:00",
    "ConditionEventCodeDisableFlag": true,
    "CreatedBy": "MNT_QA",
    "CreationDate": "2022-01-18T13:46:43+00:00",
    "LastUpdateDate": "2022-01-19T11:58:42+00:00",
    "LastUpdateLogin": "D5C58CB124BA30ADE053D45AF00A3CF9",
    "LastUpdatedBy": "MNT_QA",
    "links": [
        {
            "rel": "self",
            "href": "https://servername/fscmRestApi/resources/version/assetConditionEventCodes/300100556562569",
            "name": "assetConditionEventCodes",
            "kind": "item",
            "properties": {
                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000001770400000001737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000378"
            }
        },
        {
            "rel": "canonical",
            "href": "https://servername/fscmRestApi/resources/version/assetConditionEventCodes/300100556562569",
            "name": "assetConditionEventCodes",
            "kind": "item"
        }
    ]
}