End Work

This method ensures the successful completion of a work item that was taken from the PAW work queue and started, and reports the outputs of the work result to the PAW system.


⬅️INPUT

Parameter

Type

Required

Description

Id

Guid

✅Yes

Work ID

IsSuccess

Boolean

✅Yes

Is the work successful?

Message

String

❌No

Result message

Output

DataTable

❌No

Output data

OutputAttachment

List<PAWAttachment>

❌No

Output attachment files

ExceptionType

String

❌No

Exception type (Business/Application)

Defer

Boolean

❌No

Defer flag

DeferDate

DateTime?

❌No

Defer date


➡️OUTPUT

Parameter

Type

Required

IsStopProcess

Boolean

Should the process be stopped?

IsEndWorkSuccessful

Boolean

Success status

EndWorkMessage

String

Result message


🎯 Purpose

  • Update the status of the started work item as “Running” → “Completed”

  • Save the output data and attachments of the work item to the PAW system

  • Ensure that these outputs can be accessed again within the process


⚙️ Input Parameters

🔹 Output

The collection structure that holds the data produced as the result of the work.
This field is displayed in the output section of the work item in the PAW system.


🔹 Output Attachments

The field through which the files and documents belonging to the output are sent.

Fields:

  • Field Name: The related field name in Output

  • FileName: The name the file will have in the system

  • Data: The content of the file in Binary format


📌 How It Works

  • This method is called when the work is completed

  • The work status is automatically updated to “Completed”

  • Output and Output Attachments data are saved to the PAW system


📎 Output & Attachment Relationship

For a piece of data to appear as a clickable link in the PAW system:

  1. The attachment is added to Output Attachments

  2. For the same file:

    • The FileName value is assigned

    • The same field name is also present in the Output collection

  3. This way, the related data is displayed as a link in the PAW interface


⚠️ Important Notes

  • All files sent must be in Binary format

  • Fields in Output that have an attachment must always match Output Attachments

  • Otherwise, the files are not displayed correctly in the system


🔁 Subsequent Use

The outputs saved with this method:

  • Can be viewed per work item in the PAW system

  • Can be reused within the process with methods such as Get Work Result


💡 Summary

This method does not only report that a work item is completed; it is also a critical component that ensures all outputs of the work are stored centrally and can be reused.