Skip to content

Sharing with your organization

As a user inside an organization, you have access to the organization’s WorkData and ProcessingSteps. However, it is often necessary to change ownership of data between users and the organization. Workdata, ProcessingStep,Job, and JobGroup have convenience functions allowing for easy transfer. For instance, the following snippet copies WorkData from the user to the organization “my_org”.

from pinexq.client.job_management.tools import Workdata
workdata = Workdata.from_url(client, "<url>")
new_worklink = workdata.copy_to_org("my_org")
new_workdata = Workdata.from_url(new_worklink.get_url())

Copying objects from your organization to your user is done similarly. Note that when copying a ProcessingStep, you must specify the new human-readable title, internal function_name, and version. Ensure that the recipient does not already have this function name and version!

from pinexq.client.job_management.tools import ProcessingStep
step = ProcessingStep.from_url(client, "<url>")
new_steplink = step.copy_to_user(title="My Processing Step", function_name="my_step", version="0.1.0")
new_step = ProcessingStep.from_url(client, "<url>")