Pharos 0.7.23
Modern Web Framework & Web App Hosting Service.
Loading...
Searching...
No Matches
native_dynamic_business_logic.h File Reference

Shared declarative action, workflow, and effect helpers for dynamic-app business-logic scaffolding. More...

Go to the source code of this file.

Functions

int native_dynamic_execute_declarative_action (NativeConnection *connection, const AppRuntime *app, const HttpRequest *request, const char *action_id)
 Executes one declarative dynamic-app action contract against JSON state.
int native_dynamic_action_presentation_dup (const AppRuntime *app, const char *action_id, char **submit_label_out, char **summary_out)
 Loads declarative presentation overrides for one action contract.

Detailed Description

Shared declarative action, workflow, and effect helpers for dynamic-app business-logic scaffolding.

Definition in file native_dynamic_business_logic.h.

Function Documentation

◆ native_dynamic_action_presentation_dup()

int native_dynamic_action_presentation_dup ( const AppRuntime * app,
const char * action_id,
char ** submit_label_out,
char ** summary_out )

Loads declarative presentation overrides for one action contract.

Parameters
appFinalized app runtime metadata.
action_idAction identifier to inspect.
submit_label_outOptional duplicated submit label.
summary_outOptional duplicated summary text.
Returns
1 when the action contract was found, otherwise 0.

Definition at line 3027 of file native_dynamic_business_logic.c.

References find_action_contract_logic_local(), load_fixture_doc_logic_local(), native_json_doc_free(), native_json_obj_get(), native_json_obj_get_string_dup(), and yyjson_doc_get_root().

Referenced by proof_home_page_params_json_dup_runtime().

◆ native_dynamic_execute_declarative_action()

int native_dynamic_execute_declarative_action ( NativeConnection * connection,
const AppRuntime * app,
const HttpRequest * request,
const char * action_id )

Executes one declarative dynamic-app action contract against JSON state.

The shared runtime uses this helper for framework-owned action contracts that express typed inputs, mutation primitives, workflow bindings, effect hooks, and explanation reporting declaratively in app fixtures.

Parameters
connectionConnection that receives any error or redirect response.
appFinalized app runtime metadata.
requestParsed HTTP request.
action_idAction identifier from the matched route.
Returns
HTTP status code when the helper handled the action, or 0 when no matching declarative contract exists for the app/action pair.

Definition at line 3047 of file native_dynamic_business_logic.c.

References action_presentation_string_dup_logic_local(), ActionExecutionContextLogicLocal::anchor_record_id, ActionExecutionContextLogicLocal::anchor_resource_id, append_action_report_logic_local(), append_audit_event_logic_local(), append_record_primitive_logic_local(), append_records_from_input_list_primitive_logic_local(), append_records_from_related_collection_primitive_logic_local(), append_workflow_and_effects_logic_local(), bulk_update_primitive_logic_local(), ActionExecutionContextLogicLocal::created_record_count, find_action_contract_logic_local(), find_workflow_transition_logic_local(), free_action_execution_context_logic_local(), free_input_field_map_logic_local(), ActionExecutionContextLogicLocal::last_created_record_id, ActionExecutionContextLogicLocal::last_touched_resource_id, load_action_inputs_logic_local(), load_fixture_doc_logic_local(), native_json_doc_free(), native_json_doc_load_file(), native_json_obj_get(), native_json_obj_get_long_default(), native_json_obj_get_string_dup(), note_created_record_logic_local(), now_iso_utc_logic_local(), persist_mut_doc_logic_local(), scoped_reassignment_primitive_logic_local(), send_action_response_logic_local(), set_mut_object_field_logic_local(), set_root_fields_primitive_logic_local(), AppRuntime::state_path, streq(), update_record_primitive_logic_local(), workflow_presentation_string_dup_logic_local(), write_json_error_logic_local(), yyjson_arr_iter_init(), yyjson_arr_iter_next(), yyjson_doc_get_root(), yyjson_doc_mut_copy(), yyjson_is_arr(), yyjson_is_obj(), yyjson_mut_doc_free(), yyjson_mut_doc_get_root(), yyjson_mut_int(), and yyjson_mut_is_obj().

Referenced by handle_action_route().