Published-function
Part of Uipath maestro flow. Install the skill and your agent reads this page when it needs the depth.
Published function
Exact signatures, fields, and defaults: publishedFunction().
A Function is a small, single-purpose unit of code deployed to Orchestrator
as its own resource. publishedFunction() invokes one as a single step
(uipath.core.function.<key>, dispatched as
Orchestrator.ExecuteFunctionAsync).
Signature: publishedFunction({ key, name, folderPath, inputs?, inputSchema?, returns? }), or
publishedFunction({ key, name, location: 'in-solution', projectId, inputs?, inputSchema?, returns? })
for a coded function in the same solution (see In the same solution).
.step('echo', publishedFunction({
key: '7059bdb5-fdd7-4e13-9d7b-1748aaeb129d',
name: 'acme-echo',
folderPath: 'Shared/acme-echo',
inputs: { message: input('message') },
returns: { echoed: 'string' },
}))
.step('relay', script({ code: 'return $vars.echo.output.echoed;' }))
At a glance
Run a deployed Orchestrator Function — a small unit of code published as its own resource — as one step.
.step('echo', publishedFunction({ key: functionKey,
name: 'acme-echo', folderPath: 'Shared/acme-echo',
inputs: { message: input('message') }, returns: { echoed: 'string' } }))
A function is usually deployed into a folder of its OWN name — read folderPath
from the tenant rather than assuming 'Shared', since the binding's resourceKey
is <folderPath>.<name>.
Identity
Three fields, none of them derivable:
key— the function's GUID; it becomes the node type's suffix, so a wrong one emits a node the tenant cannot resolve. Find it withuip maestro flow registry search "uipath.core.function". Registry reads are cached for 30 minutes: if the function is missing, runregistry pull --forceonce and search again.name— the function's own name in Orchestrator.folderPath— the folder it is deployed in. A function is usually deployed into a folder of its OWN name ('Shared/acme-echo', not'Shared'). The binding'sresourceKeyis<folderPath>.<name>, so assuming'Shared'points the dispatch at nothing while still validating.
Two steps on the same function share ONE binding pair, exactly as the other published families do.
In the same solution
A coded function that is a sibling project of the Flow, in the same solution,
is not published yet, so it has no folder. Write it with
location: 'in-solution' and projectId instead of folderPath:
.step('math', publishedFunction({
key: localResourceKey,
name: '<FunctionProject>',
location: 'in-solution',
projectId: localProjectKey,
inputs: { invoice_amount: input('invoice_amount') },
returns: { variance_pct: 'number', summary: 'string' },
}))
- Or name the sibling by project (
@uipath/maestro-builder-sdk6.108.0 or later):publishedFunction({ location: 'in-solution', project: '<FunctionProject>', inputs, returns }). See agent.md for what it fills in, what it refuses, and when to fall back to the ids below. - Where the two ids come from.<!--skill-flavor:function-sibling-register:start-->
Register the sibling and refresh resources
(
uip solution projects add, thenuip solution resources refresh), then<!--skill-flavor:function-sibling-register:end--> runuip maestro flow registry list --local --output jsonfrom the Flow project directory. The generatedresources/solution_folder/process/function/<FunctionProject>.jsoncarries the same pair:resource.key→key,resource.projectKey→projectId. Never invent either; the full recipe is in agent.md. - A coded agent can land under
process/function/too (see agent.md). Check the sibling's ownentry-points.json:entryPoints[0].typeis"function"for a coded function. If it is"agent", useagent({ location: 'in-solution', flavour: 'coded', … }), notpublishedFunction(): the wrong factory validates and dispatches the wrong service type. returnscomes from the sameentry-points.json:entryPoints[0].output.properties, each field'stype. The resource file'sspec.entryPointsholds the same schema as a JSON string. The rule in Declaring what it returns still applies.checkwarns on an in-solution step with noprojectId(FUNCTION_LOCAL_NO_PROJECT_ID; the call resolves bykey, so a decompiled step without one is fine as is), and refuses aprojectIdthat is not a GUID (FUNCTION_LOCAL_PROJECT_ID_NOT_GUID) and afolderPathbesidelocation: 'in-solution'(FUNCTION_LOCAL_HAS_FOLDER): the in-solution binding's folder is'', filled in at deploy. IfcheckreportsFUNCTION_LOCAL_NO_PROJECT_IDas an error (an older SDK), addprojectIdfromresource.projectKey. Still setprojectIdon a step you author: Studio Web's Run node reads it to deploy the sibling first.
Needs @uipath/maestro-builder-sdk 6.59.0 or later; an older SDK
has no location on publishedFunction() and refuses the step as having no
folderPath (FUNCTION_NO_FOLDER).
Declaring what it returns
returns is required if anything reads the step's output. The function's real
output arguments live on the tenant and authoring is offline, so an undeclared
read is rejected (FUNCTION_READ_WITHOUT_RETURNS) — nothing here could tell a
real field from a typo. registry get uipath.core.function.<key> shows what the
platform synthesizes for a deployed one.
To type an argument differently from its value (for example an object filled
from an expression), add inputSchema; keep one a decompiled step carries. See
Orchestrator Processes.
Which family to reach for
| The deployed thing | Factory |
|---|---|
| A Function (a unit of code, its own resource) | publishedFunction() |
| A coded API workflow | apiWorkflow() |
| An RPA process | rpaWorkflow() |
| A Maestro process orchestration | agenticProcess() |
They share one emit path and differ only in service type and binding subtype, so picking the wrong one produces a flow that validates and dispatches nothing. Match the family the scenario names.
Evidence boundary
Offline validate proves the node type, the binding pair and the declared
output schema. That the function exists, accepts those arguments, and returns
those fields is platform evidence — .onError(...) is supported for the
dispatch failing.