Unrelease Changes to a Released Model

Your company is about to introduce a brand new product next month. In order to forecast demand for the new product, your sales team is trying book some advance orders leading up to the release date. Let's consider that James Johnson is a sales user trying to book a customer order effective next month but the guided selling questions and the user interface for the new product are incorrect due to an accidental release of a workspace by one of the modelers, which is effective beginning of the next month.

In order to rollback the incorrect changes made to this model, you can use the unrelease custom action in the Configurator Workspaces REST resource and revert all the changes made to a model to its immediate prior version. You can repeat this process and return to the version that you intend to have available in production.

Here's a typical application processing flow for the scenarios:

  1. You get the workspace identifier of the workspace containing the released models
  2. You get the participant identifiers of the models to be unreleased
  3. You use the unrelease custom action of the workspace resource to rollback the changes to a released model

For more information, see Oracle Supply Chain Management Cloud Modeling Configurations for SCM.

Get the Workspace Identifier

You can get the workspace identifier of the workspace containing the released models by using the ByNameOrDescriptionFinder finder of the Configurator Workspaces resource.

Example URL

Use this resource URL format.

GET

curl -u username:password -X GET -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" "https://servername/fscmRestApi/resources/version/configuratorWorkspaces?finder=ByNameOrDescriptionFinder;name= workSpaceName"

Example Response

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

{
	"items" : [ {
		"WorkspaceId" : 300100217170100,
		"Name" : "workSpaceName",
		"Description" : null,
		"EffectiveStartDate" : "2021-07-01T13:09:01+00:00",
		"StatusCode" : "RELEASED",
		"Status" : "Released",
		"ReleaseProcessId" : null,
		"PrereleaseReportProcessId" : null,
		"CreationDate" : "2020-07-30T13:09:01+00:00",
		"CreatedBy" : "USERNAME",
		"LastUpdateDate" : "2020-07-30T13:11:59.334+00:00",
		"LastUpdatedBy" : "USERNAME",
		"links" : [ {
			"rel" : "self",
			"href" : "https://servername/fscmRestApi/resources/version/configuratorWorkspaces/300100217170100",
			"name" : "configuratorWorkspaces",
			"kind" : "item"
		}, {
			"rel" : "canonical",
			"href" : "https://servername/fscmRestApi/resources/version/configuratorWorkspaces/300100217170100",
			"name" : "configuratorWorkspaces",
			"kind" : "item"
		}, {
			"rel" : "child",
			"href" : "https://servername/fscmRestApi/resources/version/configuratorWorkspaces/300100217170100/child/modelParticipants",
			"name" : "modelParticipants",
			"kind" : "collection"
		}, {
			"rel" : "action",
			"href" : "https://servername/fscmRestApi/resources/version/configuratorWorkspaces/300100217170100/action/unrelease",
			"name" : "unrelease",
			"kind" : "other"
		} ]
	} ],
	"count" : 1,
	"hasMore" : false,
	"limit" : 25,
	"offset" : 0,
	"links" : [ {
		"rel" : "self",
		"href" : "https://servername/fscmRestApi/resources/version/configuratorWorkspaces",
		"name" : "configuratorWorkspaces",
		"kind" : "collection"
	} ]
}

You need to note down the WorkspaceId value from the response payload and use the value to retrieve the participant identifiers.

Get the Participant Identifier of the Models to be Unreleased

Using the value of the WorkspaceId attribute, get the participants identifiers of the models by using the Model Participant child resource of the workspace resource.

Example URL

Use this resource URL format.

GET

curl -u username:password -X GET -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" "https://servername/fscmRestApi/resources/version/configuratorWorkspaces/WorkspaceId/child/modelParticipants"

The Model Participants child resource returns all the models in the given workspace resource. You can use the ModelParticipantByNameAndOrgFinder finder to search for specific model participants by name and organization code.

User this resource URL to search for model participants by name and organization code:

curl -u username:password -X GET -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" "https://servername/fscmRestApi/resources/version/configuratorWorkspaces/WorkspaceId/child/modelParticipants?finder=ModelParticipantByNameAndOrgFinder;Name='Model Name',Organization='Org Code'"

Example Response

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

{
"items": [
	{
	"ParticipantId": 300100217170232,
	"Name": "Model Name ",
	"Description": "Description",
	"Organization": "Org Code",
	"OrganizationName": "Org Description",
	"LockedBy": "USERNAME",
	"LockedDate": "2020-07-30T13:12:23.722+00:00",
	"CreatedBy": "USERNAME",
	"CreationDate": "2020-07-30T13:12:23.164+00:00",
	"LastUpdatedBy": "USERNAME",
	"LastUpdateDate": "2020-07-30T13:12:23.175+00:00",
	"links": [
		{
		"rel": "self",
		"href": "https://servername/fscmRestApi/resources/version/configuratorWorkspaces/300100217170100/child/modelParticipants/300100217170232",
		"name": "modelParticipants",
		"kind": "item",
		"properties": {
			"changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A657870000000017704000000017372001B6F7261636C652E6A626F2E646F6D61696E2E4E756C6C56616C75655899C1C58DAABEEB02000149000A6D53514C54797065496478700000000C78"
		}
		},
		{
		"rel": "canonical",
		"href": "https://servername/fscmRestApi/resources/version/configuratorWorkspaces/300100217170100/child/modelParticipants/300100217170232",
		"name": "modelParticipants",
		"kind": "item"
		},
		{
		"rel": "parent",
		"href": "https://servername//fscmRestApi/resources/11.13.18.05/configuratorWorkspaces/300100217170100",
		"name": "configuratorWorkspaces",
		"kind": "item"
		}
	]
	}
],
"count": 1,
"hasMore": false,
"limit": 25,
"offset": 0,
"links": [
	{
	"rel": "self",
	"href": "https://servername/fscmRestApi/resources/version/configuratorWorkspaces/300100217170100/child/modelParticipants",
	"name": "modelParticipants",
	"kind": "collection"
	}
]
}

Rollback the Changes to a Released Model

Once you have identified the model participants you want to unrelease, run the unrelease custom action of the workspace resource to unrelease the model participants.

Here are the required attributes to provide in the POST payload when unreleasing model participants:

Attribute Description
targetWorkspaceName Name of the target workspace that is created before the unrelease. If the unrelease process is successful, the participants are moved to the workspace.
targetWorkspaceDescription (Optional) Description of the target workspace that is created before the unrelease. If the unrelease process is successful, the participants are moved to the workspace.
participants List of workspace participant identifiers to be unreleased.

Example URL

Use this resource URL format.

POST

curl -u username:password -X POST -H " application/vnd.oracle.adf.action+json" -d '{
	"targetWorkspaceName": "Target Workspace for Unrelease",
	"targetWorkspaceDescription": "Description",
	"participants": [
	participantId1,
	participantId2
	]' "https://servername/fscmRestApi/resources/version/configuratorWorkspaces/WorkspaceId/action/unrelease"

If an unrelease scheduled process job is successfully created, then the scheduled process job identifier is returned when invoking the unrelease custom action. Otherwise, appropriate error message will be returned to inform you of the nature of the issue while running the custom action.

Example Response

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

{
		"retult": "12345678"
	}
	

Using the job identifier, you can use the Scheduled Process work area to monitor the status of the unrelease process and review any warning or error messages.