A coach or human service opens in its own window when you open its URL with window.open - the human service must be reachable by URL, which is the case for tasks (task URL) and for services exposed as startable (start URL):
// coach view / button handler: open a startable human service in a new window
var url = "/teamworks/executecf?modelID=1.4c1c...&branchID=2063.9a2b..."; // from the service's "Overview > Expose > URL" (Process Center: branch; Process Server: snapshotID=... instead of branchID)
window.open(url, "_blank", "width=1000,height=800,menubar=no,toolbar=no");
// open a task
window.open("/ProcessPortal/launchTaskCompletion?taskId=" + taskId, "_blank"); // 8.5.7+ portal URL
// or the raw coach URL: "/teamworks/process.lsw?zWorkflowState=1&zTaskId=" + taskId
// pass data: startable services take input variables as URL parameters (tw.local.orderId): ...&tw.local.orderId=42
// on CP4BA prefix the instance path (e.g. /baw/bawins1) - derive it from window.location.pathnameGetting data back: the popup can call window.opener (same origin) - e.g. window.opener.postMessage({ orderId: 42 }, "*") when it finishes, and the parent coach listens with window.addEventListener("message", ...) and refreshes; or the popup simply runs its own service and the parent reloads on focus. Alternatives that keep the user in one page: a UI Toolkit Modal Section containing the same coach views (no separate service), or an IFrame view with the service URL inside a modal. Browser pop-up blockers allow window.open only inside a click handler - not from a load event.
References