Workflo...HasUser(3)

πŸ“¦
version 2.09 Β· 2 versions
, in fedora 44

πŸ’– Workflo...HasUser(3) πŸ’–

okay bestie, welcome to the perl User Contributed Perl Documentation for Workflow::Condition::HasUser (yes the header truncates it, that's just how it rolls, it's giving ellipsis-core πŸ’…)


✨ NAME ✨

Workflow::Condition::HasUser β€” a condition that checks whether a user is available, fr fr 🫢


🌸 VERSION 🌸

This documentation describes version 2.09 of this package. no cap. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so first you gotta set up the condition, like:

# First setup the condition

condition:
- name: HasUser
  class: Workflow::Condition::HasUser
  param:
  - name: user_key
    value: CurrentUser

# Next, attach it to an action

state:
- name: INITIAL
  action:
  - name: 'create issue'
    resulting_state: CREATED
    condition:
    - name: CurrentUser
  ...

# Whenever you fetch available actions from state 'INITIAL' you must
# have the key 'CurrentUser' defined in the workflow context

and then whenever you fetch available actions from state 'INITIAL' you must have the key 'CurrentUser' defined in the workflow context. that's the whole vibe check. πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

It's a simple condition β€” possibly too simple, lowkey β€” that determines if a user exists in a particular context key. ngl, it actually only determines if something exists in a key, but like, we needed a simple condition to ship with the module, so here we are. main character energy of "it does one thing and it does it." πŸ‘‘

πŸŽ€ Parameters πŸŽ€

you can configure the condition with these parameters, bestie:

  • user_key, optional β€” the key in the workflow context to check for data. if you don't specify it, we use 'current_user'. defaults are a gift. 🎁

⭐ METHODS ⭐

  • evaluate ( $wf ) β€” the method that evaluates whether a user has been set for a workflow. πŸ•΅οΈβ™€οΈ

takes a workflow object as a parameter.

throws Workflow::Exception if evaluation fails. not me being dramatic but that's literally what it does 😭

🌈 SEE ALSO 🌈

  • Workflow::Condition

Copyright (c) 2004-2021 Chris Winters. All rights reserved. πŸ’–

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

Please see the LICENSE.


🧚 AUTHORS 🧚

Please see Workflow.


and that's the tea, bestie πŸ“ this page is from the perl User Contributed Perl Documentation, generated by perl v5.42.0 and dated 2026-01-17. slay, read responsibly, and go set that user key. periodt. πŸ’…βœ¨

πŸ“¦ where this page comes from