Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set tTaskResponce = %request.Content.Task Raises Property Does Not Exist #3

Closed
railrhoad opened this issue Mar 15, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@railrhoad
Copy link

commented Mar 15, 2017

Located within PostTask, we're getting a PropertyDNE on *Task. We have the other service behaving as expected in our REST client but we're now at the point where we'd like to perform updates.

{
	"errors":[ {
			"code":5002,
			"domain":"%ObjectErrors",
			"error":"ERROR #5002: Cache error: <PROPERTY DOES NOT EXIST>zPostTask+5^eReferral.REST.Services.1 *Task,%CSP.BinaryStream",
			"id":"CacheError",
			"params":["<PROPERTY DOES NOT EXIST>zPostTask+5^eReferral.REST.Services.1 *Task,%CSP.BinaryStream"
			]
		}
	],
	"summary":"ERROR #5002: Cache error: <PROPERTY DOES NOT EXIST>zPostTask+5^eReferral.REST.Services.1 *Task,%CSP.BinaryStream"
}

%request.Content is a CSP.BinaryStream, what I don't understand is how %request.Content.Task gets populated. I can understand what's getting passed in will directly influence the Content but I don't even see how this Task serialization happens within the service (as I try to debug this).

Here's my input to the service which is JSON valid and appears to be schema valid based on the sample input provided in the readme:

{
	"_class": "EnsLib.Workflow.Worklist",
	"_id": "1208||ereferraladmin",
	"Task": {
		"_class": "EnsLib.Workflow.TaskResponse",
		"_id": 1208,
		"%Action": "$Accept",
		"%Priority": 3,
		"%UserName": "",
		"%UserTitle": "",
		"%UserRanking": "",
		"%RoleName": "eReferral.WF.ClinicianReview",
		"%Subject": "Clinician review required for referral 12",
		"%Message": "Some sample message",
		"%Actions": "Reviewed,Return",
		"%FormTemplate": "",
		"%FormFields": "Comments",
		"%FormValues": {
			
		},
		"%Status": "Unassigned",
		"%TaskStatus": {
			"_class": "EnsLib.Workflow.TaskStatus",
			"Role": {
				"_class": "EnsLib.Workflow.RoleDefinition",
				"_id": "eReferral.WF.ClinicianReview",
				"Name": "eReferral.WF.ClinicianReview",
				"Description": "",
				"Capacity": 100
			},
			"AssignedTo": "",
			"TimeCreated": "2017-03-15 14:17:00.463",
			"TimeCompleted": "",
			"SessionId": 1563,
			"Source": "EnsLib.Testing.Process",
			"ResponseToken": "1564|EREFERRALPKG.EdgeGatewayProduction",
			"IsComplete": false,
			"Request": {
				"_class": "EnsLib.Workflow.TaskRequest",
				"_id": 1206,
				"%Actions": "Reviewed,Return",
				"%Subject": "Clinician review required for referral 12",
				"%Message": "Some sample message",
				"%Priority": 3,
				"%UserName": "",
				"%Title": "",
				"%TaskHandler": "",
				"%Command": "",
				"%FormTemplate": "",
				"%FormFields": "Comments",
				"%FormValues": {
					
				}
			}
		}
	},
	"User": {
		"_class": "EnsLib.Workflow.UserDefinition",
		"_id": "ereferraladmin",
		"Name": "ereferraladmin",
		"FullName": "ereferral admin",
		"IsActive": true
	},
	"Role": null,
	"TimeCreated": "2017-03-15 14:17:00.465",
	"IsNew": true,
	"Age": "00w 0d 01h 08m 47s"
}
@railrhoad

This comment has been minimized.

Copy link
Author

commented Mar 15, 2017

I even passed in the JSON from the readme (which I knew wouldn't find the task referenced) but it failed in the same place before it could even look it up.

@eduard93

This comment has been minimized.

Copy link
Contributor

commented Mar 15, 2017

You're getting an error here because %request.Content is %CSP.BinaryStream but EnsLib.Workflow.Worklist is expected. Conversion from %CSP.BinaryStream is done in ConvertRequestBody. Seems like it's not hit for you.

Please provide:

1.$zv
2. Does adding do ..ConvertRequestBody() before set tTaskResponce = %request.Content.Task and recompiling helps?
3. Does Workflow.AbstractREST compile without problems?

@railrhoad

This comment has been minimized.

Copy link
Author

commented Mar 15, 2017

You're exactly right! I was cherry picking into my preexisting service and simply missed this line. Sorry for the noise and thanks for the quick response!

@eduard93 eduard93 closed this Mar 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.