Logo von Business Process Flows

Business Process Flows

Community
korchard333
business-process-flows

Business Process Flows (BPFs). Verwenden bei: Erstellen von BPFs, BPF-Phasen, BPF-Verzweigungen, übergreifenden BPFs, Erstellen von BPF-XAML über die API, Aktivierung von BPFs, clientseitigem JavaScript für BPFs und Verwaltung von Prozessinstanzen.

Add to TypingMind

Übersicht

Herausgeberkorchard333
Repositoryclaude-power-platform-community
Skill-Namebusiness-process-flows
Sterne
50
Forks
6
Mitgelieferte Dateien
Nur Anweisungen
LizenzMIT
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • In sich abgeschlossen

    Alles, was das Modell braucht, steht in den Anweisungen — keine zusätzlichen Dateien zum Synchronisieren.

  • Open Source

    Von korchard333 auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Business Process Flows in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner. Dabei liest die App SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/korchard333/claude-power-platform-community/tree/main/.claude/skills/business-process-flows
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format unterstützt, kann diesen Skill nutzen. Kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/korchard333/claude-power-platform-community.git /tmp/claude-power-platform-community
mkdir -p .claude/skills
cp -r /tmp/claude-power-platform-community/.claude/skills/business-process-flows .claude/skills/business-process-flows
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Business Process Flows in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Business Process Flows automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Business Process Flows nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Schlüsseln.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Skill: Business Process Flows

When to Use

Trigger when designing, creating, or managing Business Process Flows (BPFs) in Model-Driven Apps.


BPF Overview

Business Process Flows guide users through a defined set of stages to complete a business process. They appear as a horizontal stage bar at the top of Model-Driven App forms.

┌─────────────┐    ┌─────────────┐    ┌─────────────┐    ┌─────────────┐
│  Qualify     │ → │  Develop     │ → │  Propose     │ → │  Close       │
│  ○ Budget    │    │  ○ Contacts  │    │  ○ Proposal  │    │  ○ Decision  │
│  ○ Timeline  │    │  ○ Needs     │    │  ○ Review    │    │  ○ Sign-off  │
│  ○ Authority │    │  ○ Solution  │    │  ○ Pricing   │    │  ○ Order     │
└─────────────┘    └─────────────┘    └─────────────┘    └─────────────┘

When to Use BPF vs Alternatives

ScenarioUse
Linear guided process (sales, onboarding)BPF
Approval routing with multiple approversPower Automate
Complex branching with parallel pathsPower Automate
Simple field validation on stage transitionBPF + Business Rule
Process spans multiple entitiesBPF (cross-entity)
Status tracking without enforcementStatus Reason field

BPF Concepts

Key Terms

TermDescription
StageA phase in the process (e.g., Qualify, Develop)
StepA data field within a stage that should be completed
BranchConditional path based on field values
Cross-entityBPF that spans multiple tables (e.g., Lead → Opportunity → Order)
Active PathThe current set of stages the record is following
Process InstanceThe specific BPF record tracking this entity's progress

BPF Entity

Every BPF creates a hidden system table (e.g., new_bpf_abc123) that stores process instance data. This table has:

  • activestageid — current stage
  • traversedpath — stages visited
  • businessprocessflowinstanceid — unique process instance
  • bpf_[entityname]id — link to the primary record

BPF Management via Web API

List Business Process Flows

http
GET /api/data/v9.2/workflows
  ?$select=name,uniquename,primaryentity,category,statecode,statuscode
  &$filter=category eq 4 and statecode eq 1

Category 4 = Business Process Flow. Statecode 1 = Activated.

Get BPF Stages

http
GET /api/data/v9.2/processstages
  ?$select=stagename,stagecategory,primaryentitytypecode,processstageid
  &$filter=processid/workflowid eq 'bpf-workflow-guid'
  &$orderby=stagecategory asc

Get Active Process Instance for a Record

http
GET /api/data/v9.2/RetrieveActivePath(Target=@target)
  ?@target={'@odata.id':'contoso_projects(record-guid)'}

Move to Next Stage

http
# Get current active stage
GET /api/data/v9.2/new_bpf_projectonboarding
  ?$filter=bpf_contoso_projectid/contoso_projectid eq 'record-guid' and statecode eq 0
  &$select=businessprocessflowinstanceid,activestageid,traversedpath

# Update to next stage
PATCH /api/data/v9.2/new_bpf_projectonboarding(instance-guid)
Content-Type: application/json

{
  "activestageid@odata.bind": "/processstages(next-stage-guid)"
}

Set BPF on a Record

http
# Create process instance
POST /api/data/v9.2/new_bpf_projectonboarding
Content-Type: application/json

{
  "bpf_contoso_projectid@odata.bind": "/contoso_projects(record-guid)",
  "activestageid@odata.bind": "/processstages(first-stage-guid)"
}

Activate / Deactivate BPF Definition

http
# Activate BPF
PATCH /api/data/v9.2/workflows(bpf-workflow-guid)
Content-Type: application/json

{ "statecode": 1, "statuscode": 2 }

# Deactivate BPF
PATCH /api/data/v9.2/workflows(bpf-workflow-guid)
Content-Type: application/json

{ "statecode": 0, "statuscode": 1 }

⚠️ SetState does NOT work for BPFs (category 4). POST /workflows({id})/Microsoft.Dynamics.CRM.SetState returns 404. Use PATCH instead.


BPF Creation via Web API

⚠️ CRITICAL: BPFs Require XAML — clientdata-Only Creation Always Fails

Unlike business rules and cloud flows, BPFs MUST be created with a xaml property. Attempting POST /workflows with category: 4 and clientdata but no xaml returns 0x80040203: workflowstep. The system auto-generates clientdata from the XAML.

Required Properties

http
POST /api/data/v9.2/workflows
Content-Type: application/json
MSCRM.SolutionUniqueName: YourSolution

{
  "name": "Asset Onboarding",
  "category": 4,
  "type": 1,
  "primaryentity": "contoso_asset",
  "scope": 4,
  "statecode": 0,
  "statuscode": 1,
  "xaml": "<Activity x:Class=\"XrmWorkflow...\" ...>[XAML]</Activity>"
}
PropertyValueNotes
category4Business Process Flow
type1Definition
scope4Organization (NOT 1 — scope=1 is rejected for BPFs)
primaryentitylogical nameThe table the BPF applies to
xamlstringREQUIRED — clientdata is auto-generated

⚠️ CRITICAL: BPF XAML Uses ActivityReference Format, Not Simplified Elements

The XAML structure below shows the conceptual hierarchy. The actual API format requires mxswa:ActivityReference elements with AssemblyQualifiedName — not simplified <mcwb:StageComposite> elements.

Reliable discovery method: Query an existing BPF's XAML from the environment and use it as a structural template:

http
GET /api/data/v9.2/workflows?$filter=category eq 4 and statecode eq 1&$select=name,xaml&$top=5

Adapt the discovered XAML (change entity names, stage names, field references). This is more reliable than building XAML from scratch.

Key format differences from simplified documentation:

  • Uses mxswa:ActivityReference with AssemblyQualifiedName for every composite element
  • Requires x:Members block (InputEntities/CreatedEntities) in the Activity header
  • Uses mxswa:Workflow wrapper
  • All properties via sco:Collection with x:Key entries
  • StepLabels with GUIDs required on every step and stage
  • Sequential DisplayName numbering is global across all XAML
  • StageCategory is always "-1" (not 0, 1, 2, 3)
  • Last stage requires <x:Null x:Key="NextStageId" />

XAML Structure

StageRelationshipCollectionComposite
  → EntityComposite (one per stage, even if same entity)
    → StageComposite
      → StepComposite
        → Sequence with mcwb:Control

BPF Step Control ClassIds

TypeClassId
Text4273edbd-ac1d-40d3-9fb2-095c621b552d
Date5b773807-9fb2-42db-97c3-7a91eff8adff
Choice3ef39988-22bb-4f0b-bbbe-64b5a3748aee
Lookup270bd3db-d9af-4782-9025-509e298dec0a
Numberc6d124ca-7eda-4a60-aea9-7fb8d318b68f
Money533b9e00-756b-4312-95a0-dc888637ac78

⚠️ BPF Backing Tables Must Be Added to Solution

Creating a BPF auto-creates a backing table (e.g., contoso_assetonboarding) but the MSCRM.SolutionUniqueName header only adds the workflow — NOT the backing table. Without solution membership + security role privileges, users can see the BPF on forms but cannot advance stages.

The backing table logical name equals the workflow's uniquename property. After creating the BPF:

  1. Add backing table to solution: AddSolutionComponent with ComponentType: 1
  2. Grant security role privileges: Create, Read, Write, Append, AppendTo at Global depth

BPF Client-Side JavaScript

Get Active Process

typescript
// Get the current BPF on the form
const activeProcess = formContext.data.process.getActiveProcess();
if (activeProcess) {
  const processName = activeProcess.getName();
  const processId = activeProcess.getId();
}

Get/Set Active Stage

typescript
// Get current stage
const stage = formContext.data.process.getActiveStage();
const stageName = stage.getName();
const stageId = stage.getId();

// Get stage steps
const steps = stage.getSteps();
steps.forEach((step) => {
  console.log(step.getName(), step.getAttribute(), step.isRequired());
});

// Move to next stage
formContext.data.process.moveNext((result) => {
  if (result === "success") {
    console.log("Moved to next stage");
  } else if (result === "crossEntity") {
    console.log("Process moved to different entity");
  } else if (result === "end") {
    console.log("Process completed");
  } else {
    console.log("Cannot move: incomplete required steps");
  }
});

// Move to previous stage
formContext.data.process.movePrevious((result) => {
  console.log("Move back result:", result);
});

BPF Events

typescript
// Stage change event
formContext.data.process.addOnStageChange((executionContext) => {
  const eventArgs = executionContext.getEventArgs();
  const direction = eventArgs.getDirection(); // "Next" or "Previous"
  const stage = eventArgs.getStage();

  // Prevent stage change based on conditions
  if (direction === "Next" && !isStageComplete(formContext)) {
    eventArgs.preventDefault();
    formContext.ui.setFormNotification(
      "Please complete all required fields before proceeding.",
      "WARNING",
      "stage_incomplete"
    );
  }
});

// Stage selected event (user clicks on a stage header)
formContext.data.process.addOnStageSelected((executionContext) => {
  const stage = executionContext.getEventArgs().getStage();
  console.log("User selected stage:", stage.getName());
});

// Process status change
formContext.data.process.addOnProcessStatusChange((executionContext) => {
  const status = formContext.data.process.getStatus();
  // "active", "aborted", "finished"
  if (status === "finished") {
    formContext.ui.setFormNotification(
      "Process completed successfully!",
      "INFO",
      "process_complete"
    );
  }
});

Set BPF Visibility

typescript
// Show/hide the BPF bar
formContext.ui.process.setVisible(false); // Hide the BPF
formContext.ui.process.setDisplayState("collapsed"); // Collapse
formContext.ui.process.setDisplayState("expanded"); // Expand

BPF with Branching

Branch Conditions

Branches are defined in the BPF designer based on field values:

Stage: Qualification
  ├── If account_type = "Enterprise" → Stage: Enterprise Review
  └── If account_type = "SMB" → Stage: SMB Fast Track

The active path recalculates when the branching field value changes.


Anti-Patterns

  • Using BPF for non-linear processes (use Power Automate instead)
  • Too many stages (>7 becomes unusable, aim for 3-5)
  • Mandatory steps on every stage (frustrates users — use recommended instead)
  • Not handling cross-entity BPF transitions in automation
  • Ignoring the BPF entity table when querying process data
  • Creating BPFs via API without XAML (clientdata-only always fails)
  • Using SetState for activation (returns 404 — use PATCH)
  • Forgetting to add BPF backing tables to the solution
  • Using scope=1 instead of scope=4 for BPFs

Related Skills

  • model-driven-apps — BPFs are consumed in Model-Driven Apps
  • dataverse — Underlying table and relationship design for BPF entities
  • dashboards — Dashboards are a separate skill for visualization
  • dataverse-web-api/business-rules-api — Business rules share the workflow entity but differ in category and creation patterns

Häufig gestellte Fragen

Was macht der KI-Skill Business Process Flows?

Business Process Flows (BPFs). Verwenden bei: Erstellen von BPFs, BPF-Phasen, BPF-Verzweigungen, übergreifenden BPFs, Erstellen von BPF-XAML über die API, Aktivierung von BPFs, clientseitigem JavaScript für BPFs und Verwaltung von Prozessinstanzen.

Warum Business Process Flows in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Business Process Flows besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Business Process Flows in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/korchard333/claude-power-platform-community/tree/main/.claude/skills/business-process-flows ein. TypingMind liest die Datei SKILL.md und installiert den Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Business Process Flows nutzen?

Jedes Modell, das Sie mit TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Business Process Flows verwenden?

So viele Sie möchten. In TypingMind können Sie Business Process Flows mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Business Process Flows kostenlos?

Ja. Der Skill wird von korchard333 auf GitHub unter der Lizenz MIT veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇