← All package workshops
Documents / INTERACTIVE WORKSHOP

Persist a document and exercise its lifecycle

DocSign v2.0.0

Generate PDF objects through the real manager, inspect private in-memory storage, and replay signed local callbacks and provider failures.

01 / CONFIGURE

Choose a scenario. Change the inputs or build a sequence of commands.

02 / RUN

Execute the installed package against a new fictional example.

03 / INSPECT

Follow the result, actual calls, generated output and integration code.

THE WORKBENCH

Make it your example.

Your server-side changes are temporary. External-service examples use local response fixtures. Start with sample data.

Execution result

Waiting for your first run
No execution yetEdit inputs ↑

Start with a preset, or change the input and run it.

The behavior is the example.

Your result will show the values, decisions and generated output from the actual package.

EXPLORE THE PACKAGE

What you can exercise here.

INTERACTIVE

Real persisted lifecycle

Document create/fresh, manager generate/requestSignature/handleCallback, UUID object names, status/provider/signers and actual PDF download.

INTERACTIVE

Callback checks

Actual LocalSignatureProvider signed POST, expiry, tampering, state and replay guards; no public callback endpoint is installed.

HOST INTEGRATION

Host requirements

Local completion is a demonstration, not a verified signature. DocuSign/HelloSign are unimplemented; wkhtml needs a binary; private durable storage/ownership are application work.

UNDERSTAND THE BEHAVIOR

A PDF artifact and a signing lifecycle are distinct.

Create real disposable Document rows, render trusted Blade or Twig templates, and replay generation, signature requests and guarded local callbacks against private in-memory storage.

01

The command list is the lifecycle

Every generate, regenerate, request-signature and callback operation is visible and editable. Run next command replays a prefix against fresh rows and memory storage. Clear sequence executes no document operation and produces no PDF. Data controls never become executable templates.

02

Storage and rendering are real but disposable

The package manager renders actual Dompdf bytes and writes through a request-local private storage adapter. Results include Document state, object metadata, checksum and downloads. Memory URLs are descriptive fixture values, not public retrieval links; all rows and objects disappear after the request.

03

Local callbacks exercise actual guards

Local signature requests produce temporary signed callback URLs consumed only inside this example. Tampered and expired URLs fail; a valid completion can be followed by a refused replay. The local demo is not a real external e-signature and never sets a claim of signed=true.

04

Unavailable adapters and failure recovery stay explicit

DocuSign and HelloSign report their actual unsupported operation here. wkhtmltopdf is unavailable on this host. Storage failure leaves no object and a draft row. Regeneration creates another PDF and resets draft state while old objects remain; document immutability and retention are application policy.

GO FURTHER

Try the boundary cases.

  1. Compare trusted template engines

    Choose Generate with Blade, then Generate with Twig with the same fictional title, recipient and quantity. Expected: the actual manager creates a draft Document and downloadable PDF for each. Put HTML-looking text in title: it is escaped. Change paper/orientation and inspect generated metadata and the artifact.

  2. Step through a persisted local lifecycle

    Run Complete a local demonstration one command at a time. Expected: generation writes a private PDF, request-signature records the local request, and a valid callback completes the demo lifecycle. signed remains false because no external signature is claimed.

  3. Prove callback admission and replay

    Run Reject callback attacks and replay and inspect each command outcome. Expected: tampered and expired requests fail without completion; the valid callback succeeds, then replay is refused. These URLs are consumed in-process and are never published as live callback endpoints.

  4. Inspect failure and regeneration semantics

    Run Fail the memory disk write, then Regeneration creates another object. Expected: failed storage creates no file; regeneration creates a new object and returns the Document to draft while retaining earlier PDFs in the request-local store. Compare title/content when the regenerate command supplies revisions.

  5. Exercise explicit non-operations

    Run Refuse unimplemented external signing to inspect the actual refusal. Then clear sequence and run. Expected: zero document rows, zero stored objects and no manager calls. Choosing a scenario does not secretly add lifecycle operations outside the visible sequence.

COMPOSE THE RESPONSIBILITIES

Useful alone.
Better when the boundaries fit.

DocSign can render validated Fields data or a proposal approved through Workflow. The application owns document authorization, permanent private storage, template review, immutable versions, signing-provider bindings and retention.

Fields Workflow Read every API and recipe