Documentation
¶
Overview ¶
Package sharepointserver administers site collections on SharePoint Server (Subscription Edition, on-premises) on behalf of a BPMN service task (ADR-0540).
Why it is not the sharepoint Worker Type ¶
connector/sharepoint speaks Microsoft Graph about lists and files in SharePoint Online, in the engine or on any host. SharePoint Server has no Graph, and its site administration is the farm's PowerShell, which only runs on a server of the farm. The two share a product name and no operation, so a target inside one Worker Type would be a type with two disjoint operation tables.
How a call runs ¶
The Worker starts Windows PowerShell for each job with a fixed program, [bootstrap]. The operation and every value travel to it as JSON in the environment, so no authored value is ever parsed as PowerShell, and the program dispatches on the operation to a fixed sequence of cmdlets: a model cannot name a cmdlet here.
Worker-only, and never supervised ¶
The account the worker runs as can administer every site of the farm, and the cmdlets exist only on a farm server, so neither the engine nor a worker Atlas supervises beside itself can do this work. The worker is installed on the farm by an operator.
Retries ¶
A job is delivered at least once, so the bootstrap is written for the second delivery: delete and restore that already happened succeed, changing an account that is already as asked changes nothing, and create-site resumes a site whose default groups were not made yet. A refusal a process can act on carries a code from Codes.
Index ¶
Constants ¶
const ( // CodeSiteExists: a site already lives at that address. CodeSiteExists = "SHAREPOINT_SERVER_SITE_EXISTS" // CodeSiteNotFound: no site lives at that address. CodeSiteNotFound = "SHAREPOINT_SERVER_SITE_NOT_FOUND" // CodeDeletedSiteNotFound: the recycle bin holds no deleted site for that address, // because it was never deleted or its retention has passed. CodeDeletedSiteNotFound = "SHAREPOINT_SERVER_DELETED_SITE_NOT_FOUND" // CodeAccountNotFound: the directory does not know a named account or AD group. CodeAccountNotFound = "SHAREPOINT_SERVER_ACCOUNT_NOT_FOUND" // CodeGroupMissing: the site has no such default group, typically because it was not // made by this Worker. CodeGroupMissing = "SHAREPOINT_SERVER_GROUP_MISSING" // CodeOwnerRequired: the account to remove is the site's primary or secondary owner; // set another owner first. CodeOwnerRequired = "SHAREPOINT_SERVER_OWNER_REQUIRED" // CodeQuotaRefused: the site uses a quota template, which excludes an individual // quota; a person changes the template. CodeQuotaRefused = "SHAREPOINT_SERVER_QUOTA_REFUSED" )
The codes of the refusals a process may have a path for. Each is a BPMN error when the task's process catches it and an ordinary failure otherwise, which keeps the retries a transient fault is owed (ADR-0461's rule). None changes on a retry. The bootstrap sets them from a check it made itself, never by reading an error's text, which SharePoint writes in the farm's language.
Variables ¶
var Codes = []string{CodeSiteExists, CodeSiteNotFound, CodeDeletedSiteNotFound, CodeAccountNotFound, CodeGroupMissing, CodeOwnerRequired, CodeQuotaRefused}
Codes lists every code a refusal carries, in the order the handbook explains them.
Functions ¶
func CheckBundle ¶
CheckBundle reports whether an endpoint and settings build a client at all.
Types ¶
type Bundle ¶
type Bundle struct {
// ManagedPath is the wildcard managed path sites live under; empty is "sites".
ManagedPath string `json:"managedPath,omitempty"`
// TimeoutSeconds bounds one call; zero is [defaultTimeout].
TimeoutSeconds int `json:"timeoutSeconds,omitempty"`
}
Bundle is the optional JSON a Worker carries beside its endpoint. There is no credential field by construction: the cmdlets run as the account the worker runs as.
{"managedPath": "sites", "timeoutSeconds": 300}
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client runs one operation on the farm this worker is a server of.
func NewClient ¶
NewClient builds the client an endpoint and bundle describe. endpoint is the web application's URL. Nothing here reaches the farm.
type Job ¶
type Job struct {
Connector string `json:"connector"`
Operation string `json:"operation"`
Parameters map[string]any `json:"parameters,omitempty"`
ResultVariable string `json:"resultVariable,omitempty"`
// ErrorCodes are the codes an error boundary or error event subprocess of the
// task's process catches (ADR-0461); a worker has no compiled process to ask.
ErrorCodes []string `json:"errorCodes,omitempty"`
}
Job is a SharePoint Server task with everything already evaluated: plain values, with nowhere to put a web application or an account the Worker runs as.
func Resolve ¶
func Resolve(store VarStore, cp *compiler.CompiledProcess, detail *compiler.ConnectorTaskDetail, elementInstanceKey uint64) (Job, error)
Resolve turns a compiled task into a Job. Engine work by necessity: the parameter template is FEEL compiled at deploy and only the engine has the scope chain.
type Options ¶
type Options struct {
// PowerShell is the interpreter; empty is [defaultPowerShell].
PowerShell string
}
Options are the parts of a client that belong to the host rather than to the Worker.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package catalog is the SharePoint Server Worker's operation table: which parameters a model must and may author for each low-code operation, and how each value is checked (ADR-0540).
|
Package catalog is the SharePoint Server Worker's operation table: which parameters a model must and may author for each low-code operation, and how each value is checked (ADR-0540). |