Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
WHLukasz committed Feb 20, 2024
1 parent 5e236ca commit 1366f83
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions docs/API/workflow/content-publishing-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ description: Flotiq support for custom workflows helps teams collaborate and pro

# Flotiq workflows

!!! note
Flotiq workflows can be customized in enterprise version only.
!!! note
Flotiq workflows can be customized in enterprise version only.
Reach out to us to discuss possible implementation.

Workflows are a powerful feature that helps teams collaborate and produce quality content.
Workflows are a powerful feature that helps teams collaborate and produce quality content.
Flotiq implements workflows for all content types defined in the system, however the default
workflow supports only a single state - `saved`. Every content object in the system carries a `workflowState` field under the `internal` section, see last line of the snippet below:

```
```json
{
"id": "snipcart-584874",
"name": "Gunpowder Temple Of Heaven",
Expand Down Expand Up @@ -56,7 +56,7 @@ can be used to help teams curate content, manage publication and archiving of co

Workflows are defined at the Content Type Definition level, in order to change the workflow of a Content Type Definition from the default one - execute a `PUT` update on the `/api/v1/internal/contenttype/:label` endpoint and provide the additional attribute pointing to the workflow identifier:

```
```json
{
"id": "d954df66-3623-11a4-ba9a-ca80993425cb",
"name": "post",
Expand All @@ -74,7 +74,7 @@ Workflows are defined at the Content Type Definition level, in order to change t

Every content object created in the system will automatically be assigned the first state of the workflow, in the example above - `draft`. In order to transition the object to a different state use a simple `PUT` request to `/api/v1/workflow/:content_type/:object_id` endpoint with the following body:

```
```json
{
"action":"_draft_review"
}
Expand All @@ -85,7 +85,7 @@ Every content object created in the system will automatically be assigned the fi

If you'd like to verify what are the possible transitions of an object, given its current state - you can issue a `GET` request to `/api/v1/workflow/:content_type/:object_id`, the response will contain the current state of the object as well as possible transitions from that state:

```
```json
{
"state": "public",
"enabled_transitions": [
Expand All @@ -103,15 +103,17 @@ If you'd like to verify what are the possible transitions of an object, given it
```
{ data-search-exclude }

### Intenal fields workflowPublishedAt and workflowPublicVersion
### Internal fields workflowPublishedAt and workflowPublicVersion

Every content object has `workflowPublishedAt` and `workflowPublicVersion` fields under the `internal` section. These fields contain information (such as `updatedAt` and `latestVersion`) about the last content object version in the public state.

!!! note
!!! note
If there are no content object versions in the `public` state, the `workflowPublishedAt` field will be set to `-1`, and the `workflowPublicVersion` field will be set to an empty string (`""`).

!!! note
If the object itself is the latest `public` version, its `workflowPublishedAt` and `workflowPublicVersion` fields will point to the current object version's `updatedAt` and `latestVersion` fields. See the example below.
```
!!! note
If the object itself is the latest `public` version, its `workflowPublishedAt` and `workflowPublicVersion` fields will point to the current object version's `updatedAt` and `latestVersion` fields. See the example below.

```json
{
"id": "snipcart-584874",
"name": "Gunpowder Temple Of Heaven",
Expand All @@ -135,7 +137,8 @@ Every content object has `workflowPublishedAt` and `workflowPublicVersion` field
}
```
{ data-search-exclude }
!!! note

!!! note
When a content object is unpublished, all `workflowPublishedAt` and `workflowPublicVersion` fields pointing to this version will be set to `-1` and an empty string (`""`).

### Published content
Expand Down

0 comments on commit 1366f83

Please sign in to comment.