BP Process file and S3

Hi!

 

Anyone here experiencing issues with business process element Process File when using S3?

I tried copying a file from 1 object to another using the Process File but no file got copied.

*Traced Data 

{
	"Element parameters": [
		{
			"Parameter": "Source object",
			"Value": {
				"Before execution": "70ec5d9f-a55e-4f5c-8f59-30d2c5149c4a",
				"After execution": "70ec5d9f-a55e-4f5c-8f59-30d2c5149c4a"
			}
		},
		{
			"Parameter": "Data source filters",
			"Value": {
				"Before execution": "{\"className\":\"Terrasoft.FilterGroup\",\"serializedFilterEditData\":\"{\\\"className\\\":\\\"Terrasoft.FilterGroup\\\",\\\"items\\\":{\\\"84ea9c84-8004-4f6b-aa40-9f0fee8c0bd6\\\":{\\\"className\\\":\\\"Terrasoft.CompareFilter\\\",\\\"filterType\\\":1,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"className\\\":\\\"Terrasoft.ColumnExpression\\\",\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"RecordId\\\"},\\\"isAggregative\\\":false,\\\"key\\\":\\\"84ea9c84-8004-4f6b-aa40-9f0fee8c0bd6\\\",\\\"dataValueType\\\":10,\\\"leftExpressionCaption\\\":\\\"Record Id\\\",\\\"referenceSchemaName\\\":\\\"SysFile\\\",\\\"rightExpression\\\":{\\\"className\\\":\\\"Terrasoft.ParameterExpression\\\",\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"className\\\":\\\"Terrasoft.Parameter\\\",\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Parameter:{9837ac87-79b0-4a5a-b0bb-cbc12b6bd3ee}]\\\",\\\"displayValue\\\":\\\"Contact\\\"}}}}},\\\"logicalOperation\\\":0,\\\"isEnabled\\\":true,\\\"filterType\\\":6,\\\"rootSchemaName\\\":\\\"SysFile\\\",\\\"key\\\":\\\"\\\"}\",\"dataSourceFilters\":\"{\\\"items\\\":{\\\"84ea9c84-8004-4f6b-aa40-9f0fee8c0bd6\\\":{\\\"filterType\\\":1,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"RecordId\\\"},\\\"rightExpression\\\":{\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Parameter:{9837ac87-79b0-4a5a-b0bb-cbc12b6bd3ee}]\\\"}}}}},\\\"logicalOperation\\\":0,\\\"isEnabled\\\":true,\\\"filterType\\\":6,\\\"rootSchemaName\\\":\\\"SysFile\\\"}\"}",
				"After execution": "{\"className\":\"Terrasoft.FilterGroup\",\"serializedFilterEditData\":\"{\\\"className\\\":\\\"Terrasoft.FilterGroup\\\",\\\"items\\\":{\\\"84ea9c84-8004-4f6b-aa40-9f0fee8c0bd6\\\":{\\\"className\\\":\\\"Terrasoft.CompareFilter\\\",\\\"filterType\\\":1,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"className\\\":\\\"Terrasoft.ColumnExpression\\\",\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"RecordId\\\"},\\\"isAggregative\\\":false,\\\"key\\\":\\\"84ea9c84-8004-4f6b-aa40-9f0fee8c0bd6\\\",\\\"dataValueType\\\":10,\\\"leftExpressionCaption\\\":\\\"Record Id\\\",\\\"referenceSchemaName\\\":\\\"SysFile\\\",\\\"rightExpression\\\":{\\\"className\\\":\\\"Terrasoft.ParameterExpression\\\",\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"className\\\":\\\"Terrasoft.Parameter\\\",\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Parameter:{9837ac87-79b0-4a5a-b0bb-cbc12b6bd3ee}]\\\",\\\"displayValue\\\":\\\"Contact\\\"}}}}},\\\"logicalOperation\\\":0,\\\"isEnabled\\\":true,\\\"filterType\\\":6,\\\"rootSchemaName\\\":\\\"SysFile\\\",\\\"key\\\":\\\"\\\"}\",\"dataSourceFilters\":\"{\\\"items\\\":{\\\"84ea9c84-8004-4f6b-aa40-9f0fee8c0bd6\\\":{\\\"filterType\\\":1,\\\"comparisonType\\\":3,\\\"isEnabled\\\":true,\\\"trimDateTimeParameterToDate\\\":false,\\\"leftExpression\\\":{\\\"expressionType\\\":0,\\\"columnPath\\\":\\\"RecordId\\\"},\\\"rightExpression\\\":{\\\"expressionType\\\":2,\\\"parameter\\\":{\\\"dataValueType\\\":26,\\\"value\\\":{\\\"value\\\":\\\"[IsOwnerSchema:false].[IsSchema:false].[Parameter:{9837ac87-79b0-4a5a-b0bb-cbc12b6bd3ee}]\\\"}}}}},\\\"logicalOperation\\\":0,\\\"isEnabled\\\":true,\\\"filterType\\\":6,\\\"rootSchemaName\\\":\\\"SysFile\\\"}\"}"
			}
		},
		{
			"Parameter": "Target object",
			"Value": {
				"Before execution": "e9eafee9-c4e4-4793-ad0a-003bd2c6a9b4",
				"After execution": "e9eafee9-c4e4-4793-ad0a-003bd2c6a9b4"
			}
		},
		{
			"Parameter": "Number of records to read",
			"Value": {
				"Before execution": 100,
				"After execution": 100
			}
		},
		{
			"Parameter": "Columns order",
			"Value": {
				"Before execution": "",
				"After execution": ""
			}
		},
		{
			"Parameter": "Id of created files",
			"Value": {
				"Before execution": [],
				"After execution": []
			}
		},
		{
			"Parameter": "Id of the connected object",
			"Value": {
				"Before execution": "eacf403c-fcfe-4e93-b4f7-982cc4a54f8c",
				"After execution": "eacf403c-fcfe-4e93-b4f7-982cc4a54f8c"
			}
		},
		{
			"Parameter": "UId of the connected object column",
			"Value": {
				"Before execution": "f442867d-73ca-49b3-a8ba-8a2566b1fc59",
				"After execution": "f442867d-73ca-49b3-a8ba-8a2566b1fc59"
			}
		},
		{
			"Parameter": "File action type",
			"Value": {
				"Before execution": 0,
				"After execution": 0
			}
		},
		{
			"Parameter": "Collection of files",
			"Value": {
				"Before execution": [],
				"After execution": []
			}
		},
		{
			"Parameter": "Consider time in the filter",
			"Value": {
				"Before execution": true,
				"After execution": true
			}
		},
		{
			"Parameter": "Source data object",
			"Value": {
				"Before execution": "70ec5d9f-a55e-4f5c-8f59-30d2c5149c4a",
				"After execution": "70ec5d9f-a55e-4f5c-8f59-30d2c5149c4a"
			}
		},
		{
			"Parameter": "Target data object",
			"Value": {
				"Before execution": "00000000-0000-0000-0000-000000000000",
				"After execution": "00000000-0000-0000-0000-000000000000"
			}
		}
	],
	"Process parameters": [
		{
			"Parameter": "Contact",
			"Value": {
				"Before execution": "eacf403c-fcfe-4e93-b4f7-982cc4a54f8c",
				"After execution": "eacf403c-fcfe-4e93-b4f7-982cc4a54f8c"
			}
		}
	]
}

 

Like 0

Like

2 comments
Best reply

Hi!

I ended up making a script task for it.
 

Guid recordId = Get<Guid>("ppUploadedFileId");
var fileLocator = new EntityFileLocator("SysFile", recordId);
IFile file = UserConnection.GetFile(fileLocator);
 
Guid contactId = Get<Guid>("ppContactId");
Guid copyFileId = Guid.NewGuid();
 
var copyFileLocator = new EntityFileLocator("ContactFile", copyFileId);
IFile copyFile = UserConnection.CreateFile(copyFileLocator);
copyFile.Name = file.Name;
copyFile.SetAttribute("ContactId", contactId);
copyFile.Save();
 
file.Copy(copyFile); 

Hello,

To help address the issue, it would be beneficial to review the whole process, the values passed between elements, and the system configuration and S3 settings.

For a deeper analysis, I recommend creating a ticket at support@creatio.com. The support team will help identify the cause and fix the problem.

Hi!

I ended up making a script task for it.
 

Guid recordId = Get<Guid>("ppUploadedFileId");
var fileLocator = new EntityFileLocator("SysFile", recordId);
IFile file = UserConnection.GetFile(fileLocator);
 
Guid contactId = Get<Guid>("ppContactId");
Guid copyFileId = Guid.NewGuid();
 
var copyFileLocator = new EntityFileLocator("ContactFile", copyFileId);
IFile copyFile = UserConnection.CreateFile(copyFileLocator);
copyFile.Name = file.Name;
copyFile.SetAttribute("ContactId", contactId);
copyFile.Save();
 
file.Copy(copyFile); 
Show all comments